I want to select a measure between two dates. The start date will be the prompt input date minus one month and the end date will be the prompt input date plus 3 months. I am using SQL server.
In the normal universe we will use the dateadd function to derive this. However this does not seem to be working in the OLAP universes. If some has implemented can you please share it with me?
I can only recommend that you create this as a calculated key figure in the Bex query instead (using SAP variables, etc.), then base your OLAP universe on that Bex query.
If I dont want to write BEx for this , can I do such date calculation in Designer or WebI reports. My requirement is to show the data for last 7 days from selected date from Xcelsius Dashboard.
I am using webi report as source in Xcelsius dashboards with LiveOffice connections.
Any reference for date calculations in SAP BI based universe.
Environment Details:
BOXI R3.1
SAP BI Universe
Xcelsius 2008
My question was how can i do the date calculations on SAP based universe. For e.g. today is 21-July-2009, I want to substract 7 days from this date and want 14-July-2009 as the result. How can I do this in SAP based universe.
BOCP, I would be curious to know how it it exactly would work in an OLAP universe regarding creating a dynamic date condition in the universe for date ranges (last 3 months starting from a prompted date), etc.
Please, can you be more specific in your answers?
I suggest create one variable in BEx query which results data for last 7th day based on prompt input.(User entry/selection), You need to write ABAP code to get 7th day.
Eg:
Step-1 ::Place Filter on Fiscal Day in Bex query.(I think you aware), in properties Check ready for Input and UserExit.
Step-2:: Create a key figure which contains data like [rev] or [Amt] etc…, and Fiscal day with that user Exit which gets last 7th day data.
after a substantial struggle… the conclusions from my side are: No dimensional calculations can be done from SAP BW cube universes (only measures can be used in calculations). All calculations can be done only at the infocube or the Bex query.
The work around :For each date populate a relative date column. For eg if the date is 23/07 then populate month-1 23/06 on the same record- so you can use this in the select clause. If you want to use it as a filter then populate month +1 ie 23/08. You will use month+1 = @prompt('enter date). So if the user enters 23/08 the data returned will correspond to 23/07.
The OLAP functions can also be used. However it needs a proper hierarchy to be set up in SAP BW. I could do it with limited success, but due to my limited knowledge in sap bw, could not complete it.
I will be happy if someone could provide a better solution than the above suggested.
Hope this helps
Nathan