COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Active Reports => Topic started by: ToriBurns on 21 May 2014 10:22:12 PM

Title: Filter crosstab with 'All' or Specific data
Post by: ToriBurns on 21 May 2014 10:22:12 PM
Hi Gurus,

I have a report with a dropdown list and crosstab. The dropdown list has different items from the table and a static item which serves as 'All'. If the user selects a value other than 'All' the crosstab should be filtered based on the value selected. But, if the user selects the static item, which is 'All', the crosstab should fetch all the data from the table. I am using a dimensional datasource. It can be done by using a deck but by doing that would require two crosstabs. One for the 'All', and one for specific value. I wonder if it can be done without having two different crosstabs? Any suggestion or advice is highly appreciated. Thanks in advance. :)
Title: Re: Filter crosstab with 'All' or Specific data
Post by: MFGF on 22 May 2014 07:00:26 AM
Quote from: ToriBurns on 21 May 2014 10:22:12 PM
Hi Gurus,

I have a report with a dropdown list and crosstab. The dropdown list has different items from the table and a static item which serves as 'All'. If the user selects a value other than 'All' the crosstab should be filtered based on the value selected. But, if the user selects the static item, which is 'All', the crosstab should fetch all the data from the table. I am using a dimensional datasource. It can be done by using a deck but by doing that would require two crosstabs. One for the 'All', and one for specific value. I wonder if it can be done without having two different crosstabs? Any suggestion or advice is highly appreciated. Thanks in advance. :)

Filtering crosstabs is never easy because you need to have items in the crosstab layout that correspond to the filter values. I'd suggest the simplest and easiest method is to use a deck, as you suggest above. Have the "All" value activate the default card (ie set the variable to empty) to show the crosstab with all values in it.

Cheers!

MF.
Title: Re: Filter crosstab with 'All' or Specific data
Post by: ToriBurns on 22 May 2014 08:47:45 PM
Thanks for the reply MFGF. ;D

I tried to use a list. And filtering it is not as hard as filtering a crosstab. I am planning to use a list instead, but the problem is I can't drag the total summary of list under it's header. I don't want it to show as a footer of the list. Is it possible to do that?And if not, does using a deck to filter a crosstab or a chart  will affect the performance of the report? Like..will it slow down?Again, thanks in advance. :)
Title: Re: Filter crosstab with 'All' or Specific data
Post by: Francis aka khayman on 13 Jun 2014 04:19:18 AM
Quote from: ToriBurns on 22 May 2014 08:47:45 PM
I am planning to use a list instead, but the problem is I can't drag the total summary of list under it's header. I don't want it to show as a footer of the list. Is it possible to do that?

Yes. Select the list, then open the "Structure" menu. In "Headers & Footers", either select Create Header or "List Headers & Footers", then create a header. You might need to unlock your report (click the lock icon beside the run icon from the toolbar) and drag and drop items in the newly created header. You might also need to merge or split cells. This option can be found under the Table menu.
Title: Re: Filter crosstab with 'All' or Specific data
Post by: ToriBurns on 13 Jun 2014 05:45:24 AM
Thanks for the reply Khayman. I tried your suggestion but I can't split the cell for the total. And the total that I should place there is not a grand total. It is a total for each column of the list.

For now, I filtered a list and dragged a conditional block on the list. I placed inside that  conditional block the crosstab that I want to filter and set the master-detail relationship of the two. It works fine only that the list is like flashing when the selected value is changed when run on ipad.