5 Replies Latest reply on Apr 24, 2017 3:34 PM by Venkata Yaswanth Ramisetty

# Max Month By Quarter

Hi,

I have question about calculate max month on the each quarter form 2016. How can I calcuate this in obiee?

For example I check 2016 year and I want show on analisys each quarter and their max month:

Q1 || Month 03

Q2 || Month 06

Q3 || Month 09

Q4 || Month 12

How create month formule for this?

Or maybe formule for last day for each quarter and then I extract month from date?

• ###### 1. Re: Max Month By Quarter

Hi,

Not sure to get what the rule behind your "max month" ...

Do you want to get for each quarter the month which has the maximum value of measure (for example "for 2016 Q1 the max sales where in February") or do you want to get the "max" month available in your data?

So if your fact table has some data for 14-Jan-2017, 22-Feb-2017 and 03-Mar-2017 your max month for 2017 Q1 is March (because of 03-Mar-2017 being the "max" date) ?

• ###### 2. Re: Max Month By Quarter

Hi Gianni,

In this case I have data for each day in month that I want to get max month compare with may fact table.

That is second case in your anwser.

• ###### 3. Re: Max Month By Quarter

What dos your date dimension table look like?  are you using an accumulating fact or a snapshot?  the key to success is there ...

• ###### 4. Re: Max Month By Quarter

Hi,

You could do something like below to get max month by quarter, it ranks month number by quarter and then you can just filter rank 1.

RANK(MONTH("Time"."Date") by "Time"."Quarter")

• ###### 5. Re: Max Month By Quarter

Hi,

You can drag the Quarter, Month (make this as MAX(MONTH), and the fact. This should work fine.

FYR..

Regards,

Yaswanth