I have Year and Month columns are there in my data base. I want to calculate Quarter wise revenue. How can i retrieve Quarter by using Year and Month Columns. Any work around this please…
We are using SAP cubes . So there is no concept of tables. Any thing we can do is in the report level only. Is there any function is there to retrieve quarter out of Year and Month.
Create a column Month Number 1-12. Make Jan as 1 Feb as 2 Mar as 3 and so on.
Now use this condition to develop an object
If Month num In 1,2,3 then qtr 1 else if month num in 4,5,6 str 2 else if month num in 7,8,9 qtr 3 else qtr 4 end if.
Declare this variable global and use this whereever you need.
I hope this logic should work for you.
'coz we create cubes in SSAS for Voyager related work for our client and to handle these month in most robust ways we added this one column (month number) in month table and we did a lot oof magic with the help of this.
I guess he want to build up a hierarchy while building the cube wherein he needs the Quarter dimension. So he needs to build his datamodel in such a way that he can handle month, Qtr, Yr.
'coz he posted the same question again and Marek has locked that topic asking him to refer this.
I suggested that way 'coz thats much more faster and if you implement something at database level rather than just at universe or report level it is always more stable and performance oriented. 'coz in real time scenario we need performance. Also from consultation point of view if he has to satisfy 2 sets of users (1. Taking data from universe & 2. Taking data from cube directly) then in that case he has to redesign all that. Which i believe add complexity to his model.