COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Dineshpullagura on 11 Feb 2015 02:10:17 PM

Title: Implementing relative time prompt
Post by: Dineshpullagura on 11 Feb 2015 02:10:17 PM
Hello,

I am using cube as a data source for my report. In my report i am using a value prompt which displays the following options 1 day, 1 week, one month, six months, 1 year, 2 years and LTD.

Currently i am using static choices as use values and using a case statement in detail filter to filter the data. But, using detailed filters is not a good approach while working with cubes.

I tried to use slicers by changing the use values of my prompt to 'level unique names'  like

Use Value                                                                                   
[CUBE_NAME].[DIMENSION].[HIERARCHY].[LEVEL]                           

I am stuck at what should be the slicer expression, so as to filter the data as per the relative time selected by the user.

Please suggest.

Thanks for your time.

Title: Re: Implementing relative time prompt
Post by: MFGF on 11 Feb 2015 03:01:22 PM
Quote from: Dineshpullagura on 11 Feb 2015 02:10:17 PM
Hello,

I am using cube as a data source for my report. In my report i am using a value prompt which displays the following options 1 day, 1 week, one month, six months, 1 year, 2 years and LTD.

Currently i am using static choices as use values and using a case statement in detail filter to filter the data. But, using detailed filters is not a good approach while working with cubes.

I tried to use slicers by changing the use values of my prompt to 'level unique names'  like

Use Value                                                                                   
[CUBE_NAME].[DIMENSION].[HIERARCHY].[LEVEL]                           

I am stuck at what should be the slicer expression, so as to filter the data as per the relative time selected by the user.

Please suggest.

Thanks for your time.

Can you tell us how to determine which day member to show if the user picks the "1 day" option? The same applies for the other options too - which week/month/half year/year etc should be used?

MF.
Title: Re: Implementing relative time prompt
Post by: Dineshpullagura on 11 Feb 2015 03:06:45 PM
Hi,

I apologize for the confusion. By 1 day i mean current day -1 day, same as with week ,month and year.

1 week= data for last one week(current day- 7 days)
1 month= data for last one month  (current day - last month number of days)

Thanks
Title: Re: Implementing relative time prompt
Post by: MFGF on 12 Feb 2015 04:25:28 AM
Quote from: Dineshpullagura on 11 Feb 2015 03:06:45 PM
Hi,

I apologize for the confusion. By 1 day i mean current day -1 day, same as with week ,month and year.

1 week= data for last one week(current day- 7 days)
1 month= data for last one month  (current day - last month number of days)

Thanks

Ok - can you tell us what the MUN (Member Unique Name) for a Day member looks like (You can see it if you right-click a day member and select Properties)? We will need the same for a month member, and for the members of the other levels you want to select...

MF.
Title: Re: Implementing relative time prompt
Post by: Dineshpullagura on 12 Feb 2015 08:15:34 AM
Please find the MUNs below.

Year MUN  --    [CUBE].[Date].[YMDH].[Year]->:[RO].[Date].[YMDH].[All].[2014]
Month MUN --   [CUBE].[Date].[YMDH].[Month]->:[RO].[Date].[YMDH].[All].[2014].[201406]
Week MUN  -- [CUBE].[Date].[YMDH].[Week]->:[RO].[Date].[YMDH].[All].[2014].[201401].[20140131004055?20140131631]
Day MUN --  [CUBE].[Date].[YMDH].[Day]->:[RO].[Date].[YMDH].[All].[2014].[201401].[20140103234045?2014010363].[352]
Hour MUN  -- [CUBE].[Date].[YMDH].[Hour]->:[RO].[Date].[YMDH].[All].[2014].[201401].[20140103234045?2014010363].[352].[352]


Thank you