If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Tuples and date ranges

Started by tibo-k3, 31 May 2011 07:18:43 AM

Previous topic - Next topic

tibo-k3

Hi,

I'd like to compare a measure for two differents date ranges. These range has to be defined by the user, as data parameters : range1_start, range1_end, range2_start and range2_end (so, the length of the range is not defined and no necessary the same).

In my X table, i put the measure and I'd like to have tow columns as calculated members :

tuple( [time].[date] -> in_range (range1_start , range1_end) )

Obviously it doesn't work... I works only for "-> range1_start" or "-> range1_end" but not for something like "between", "range" or ">= and <="...

Anyone ? Thanks !

tibo-k3

Okay... So, i finally used something completly different, using expression :

total(
case when
[dimension].[hierarchy].[date] >= ?date1?
and
[dimension].[hierarchy].[date] <= ?date2?
then
[mesure]
else
0
end)

technomorph

If I understand correctly it sounds like you might be using two date prompts to create a range? If this is the case, you don't need to do this. Just set the Range property to true on the date prompt and I reckon something like the following will work (although as a disclaimer, I haven't looked at MDX for a while):

tuple( [time].[date] -> in_range ?date?, measure )

Cheers