COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: philelmousse on 08 Jul 2011 05:26:11 AM

Title: Best practice to build a crosstab with differents filters
Post by: philelmousse on 08 Jul 2011 05:26:11 AM
Hello,

I want build a crosstab and each row should use a different filter. I have to create a query for each row and make union to get totals, right ?

Is this the correct way ?

Thanks for the advices.
Title: Re: Best practice to build a crosstab with differents filters
Post by: MFGF on 08 Jul 2011 08:53:10 AM
If it's a relational package, you will need multiple queries yes.  If you're using a dimensional package then you can do it all in one query.

Regards,

MF.
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 08 Jul 2011 08:55:23 AM
its based on a star schema. So one query for each row with singleton in the crosstab ? Argh
Title: Re: Best practice to build a crosstab with differents filters
Post by: MFGF on 08 Jul 2011 09:46:29 AM
Is there any option to model it as DMR in Framework Manager?  It would make reports like this much easier to write.

MF.
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 08 Jul 2011 09:51:11 AM
I made my model with regular dimensions and a fact.
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 08 Jul 2011 09:54:32 AM
So If I make the filters on my fact table directly in framework manager I will be able to use only one query for my crosstab, right ?
Title: Re: Best practice to build a crosstab with differents filters
Post by: MFGF on 08 Jul 2011 10:18:42 AM
No - not with a relational model.  You would need to build a dimensional model by creating Regular Dimensions and Measure Dimensions in Framework Manager, then publishing these into a package and using them.

Regards,

MF.
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 08 Jul 2011 11:05:22 AM
Thats what i did :) But i'm blocked to filter each row in my crosstab
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 09 Jul 2011 03:08:51 AM
please, how do it in one query ? I have regular dimension and measure but not able to filter each row. I tried to drag and drop my members on each level and then cut the level but it aggregate the total
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 10 Jul 2011 03:28:43 AM
I change the box type to none. Is it correct ?
Title: Re: Best practice to build a crosstab with differents filters
Post by: MFGF on 10 Jul 2011 10:40:32 AM
How do you want the 'filters' to work? There are different ways of doing this, either by just bringing in individual members for your rows, or by creating query calculations for each row using tuples/sets/filter functions etc.  If you can give us some ideas of what you're facing, we might be able to suggest the best way forward.

Best regards,

MF.
Title: Re: Best practice to build a crosstab with differents filters
Post by: philelmousse on 10 Jul 2011 11:04:08 AM
In the rows I have calculated queries where I juste make something like that :
"Member1 + Member2 + Member3"
To filter that I add members of another dimension on the right of calculated query and its ok i get the good values. But now I want delete the column where I have the calculated queries and keep the same values. So change the box type property is the way to do it ?