Hi to all,
i have a prompt on a DMR model based on a TimeDimension, i use this for different scope, now i have a strange requirement that is if a select a mont , i have to obtain the data for the month that i select and the previous month..
example .. select MAY -> obtain APRIL and MAY...
Some idea ?????
bye
Sure...
I would use the month number as the Use Value in the prompt and also in the report's filter. The Filter that uses the parameter from this prompt needs to be an OR.
So for example, the filter expression might look like:
[Namespace].[querysubject].[Month] = ?pMonthNum?
OR
[Namespace].[querysubject].[Month] = (if(?pMonthNum? <> 1) then (?pMonthNum? - 1) else (?pMonthNum? + 11))
... you will also need a filter to account for the year, as in the case of January being the Month selection, so that you get last year's December (12).
HTH, M
If I'm not mistaken, you can use dimensional functions on DMR. parallelPeriod should do the trick if you're model's well-built. Also, try to avoid using filters on dimensional data, use context filters and sets instead.