COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tarunkrdas2013 on 03 Nov 2015 01:13:43 PM

Title: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: tarunkrdas2013 on 03 Nov 2015 01:13:43 PM
I have DMR cross tab report with static values from Value prompt as TY sales,LY sales.
Problem is when i run report all measures are displayed whereas i want only selected metrics
to be displayed in cross tab.

My Report expression is

if ('TY Sales' in ?p_Metrics? and 'DATE' in ?p_ReportType?)
then (
tuple([Hierarchical].[Sales].[TY Member Net Sales Amount], [DAILY])
)
else
(if ('TY Sales' in ?p_Metrics? and 'WEEK' in ?p_ReportType?)
then (
tuple([Hierarchical].[Sales].[TY Member Net Sales Amount], [WTD])
)
else
(if ('TY Sales' in ?p_Metrics? and 'PERIOD' in ?p_ReportType?)
then (
tuple([Hierarchical].[Sales].[TY Member Net Sales Amount], [PTD])
)
else
(
tuple([Hierarchical].[Sales].[TY Member Net Sales Amount], [YTD])
)
)
)

Can anyone please let me know about this
Title: Re: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: sdf on 03 Nov 2015 10:16:02 PM
have you tried using a filter or a slicer?
Title: Re: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: tarunkrdas2013 on 04 Nov 2015 11:34:55 AM
will try and let you know
Title: Re: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: tarunkrdas2013 on 05 Nov 2015 11:02:20 AM
No success with filter and slicer as well,attached report xml if you can suggest something
Title: Re: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: sdf on 09 Nov 2015 03:56:04 AM
please try

if ( ?p_Metrics? = 'TY Sales'  and  ?p_ReportType?='DATE')

for all conditions.
Title: Re: How to achieve only Selected metrics from from Value prompt to be displayed
Post by: tarunkrdas2013 on 30 Nov 2015 04:23:58 PM
Thanks SDF it worked