COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Arumugam on 17 Jan 2017 10:35:26 PM

Title: Slicer
Post by: Arumugam on 17 Jan 2017 10:35:26 PM
Hi All,

         Need a help.I have used slicer in series of the chart report.Slicer works based on the user selection prompt(set expression is used).In the prompt there is two types one is cumulative and other is split view.If user selects cumulative i need to aggregate it and show it in chart and if selected is split view,I need to show it as it is..Cumulative fn working fine in the chart.For the split view,I have used set expression([1],[2],[3]) like that but I am getting the error "Invalid coercion from memberset to value for set""..Can anyone give suggestion for this?
Title: Re: Slicer
Post by: bdbits on 18 Jan 2017 04:26:50 PM
Copy and paste the exact expressions you used.
Also is this a cube or something else?
Title: Re: Slicer
Post by: Arumugam on 18 Jan 2017 10:33:23 PM
yeah it is a cube..Is there any way to pass member set in the "If" or "Case" statement.

case
when (?pProduct? = 'TIL') then ([Terminal Illness])
when (?pProduct? = 'TI12') then ([Terminal Illness<12])
when (?pProduct? = 'TI13') then ([Terminal Illness<24])
when (?pProduct? = 'TI24') then ([Terminal Illness>24])
when (?pProduct? = 'TI-SV') then ([Terminal Illness, Split View])
else ([Terminal Illness, All])
end

First three are cube reference data item

TI-SV - set([Terminal Illness],[Terminal Illness<12],[Terminal Illness<24],[Terminal Illness>24])

Terminal Illness,All ----> member(if(value(tuple([TI + TI12],[Claim Received Count] )) is null)
then  ([TI13 + T124])
else if(value(tuple([TI13 + T124],[Claim Received Count] )) is null)
then ([TI + TI12])
else ([TI + TI12]+[TI13 + T124]),
'TI-ALL', 'Terminal Illness, All',[Claims - ODS].[All Claim Types].[All Claim Types])

As everything passing as a value expect TI-SV it is throwing an error
Title: Re: Slicer
Post by: linbai on 19 Jan 2017 12:51:22 AM
try this: make two lists,one is aggregate and other is split,
If user selects cumulative show the  aggregate one,else show the split one
Title: Re: Slicer
Post by: Arumugam on 19 Jan 2017 02:01:41 AM
Requirement is to achieve it in same report with out adding anything addition to that..Already report is very because of many pages and variables
Title: Re: Slicer
Post by: bdbits on 19 Jan 2017 11:38:18 AM
What does "[Terminal Illness, Split View]" represent? Is this in your cube?

Your expression for "Terminal Illness,All" - is this pulling a specific member, e.g. "[TI13+T124]" being a specific member? But then your else clause appears to be adding two members together, which would produce a value and not a member. (Really confusing with arithmetic operators in level names.) Mixing members and values would seem to be related to your error message.
Title: Re: Slicer
Post by: Arumugam on 19 Jan 2017 11:25:58 PM
I have created the data item [Terminal Illness,Split View] in order to represent the category that belongs to the terminal Illness..TI12,TI13,TI24 are the data item in the cube.[TI12+TI13] is the calculated data item to handle the null value.If either one of them is null then it would show other one or else it will aggregate both
Title: Re: Slicer
Post by: Arumugam on 19 Jan 2017 11:35:16 PM
Is there any way to pass the set expression in "If" or "Case" statement