Wednesday, August 17, 2011

How to find current quarter without using time series function OBIEE

How to find current quarter without using time series function OBIEE ?

It can be resolved in multiple ways like - either using variable or without variable
Last qtr of every year is fixed that is 4th for that calendar year so either 4 or QTR4 or something like this which can be hardcoded in your expr here:
Method 1:
Using with variable...I have a curr_year dynamic repository variable here...and a date column in my report:
CASE WHEN YEAR(datecolumn) = VALUEOF("curr_year") THEN QUARTER_OF_YEAR(datecolumn) ELSE 4 END
method 2:
Using without variable....and a date column in my report:
CASE WHEN YEAR(datecolumn) = YEAR(CURRENT_DATE) THEN QUARTER_OF_YEAR(datecolumn) ELSE 4 END

Hope this solves your problem..


Regards,

Deva

 


 

No comments:

Post a Comment