I have following problem: There is an InfoCube with stock and sale information for each item and each day. I need a query to show the stock on the selected day and the sales of the last x days. How can I store this variable in the query? How do I define the Query? I tried a restricted key figure with a customer exit but I didn't get the current selected day. And if I change the filter value for the selected day in the BEx-analyzer I didn't catch the customer exit at all.
Does anybody have a suggestion.
your idea with the restricted Key Figures was right,
but you don´t need a customer exit for this, just restrict the key figure to characterstic date (e.g. 0DATE) and assign a variable to this characteristic (if there is no variable you can create easily one via viariable wizard.
The sales of the last x days can be even done by a variable.
Create another restricted key figure with day and set an intvall from your variable to your variable - 6 (this is a example offset which can set by: right click om variable >> set offset.
The Offset calculates in runtime: e.g. variable value is 20.02.2006 then offset -1 is 19.02.2006.