COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: JP1981 on 21 Oct 2014 08:59:42 AM

Title: Case statement splitting up rows
Post by: JP1981 on 21 Oct 2014 08:59:42 AM
Hi,

i would appreciate any help in this issue,

i have a report, first column is region, second column is a case statement (count Ofc_num when product = A), third column is another case statement (count ofc_num when status = X).    ofc is coming from fact, product and status is coming from two different dimensions.

the issue is that the rows are splitting up. here is what i get

America     12      0
Asia           56      0
UK             18      0
America      0      33
Asia            0      14
UK              0      11


What can i do to make sure they don't split up and i see them in one row like below

America     12     33
Asia           56     14
UK             18     11

thank you,
JP

Title: Re: Case statement splitting up rows
Post by: Lynn on 21 Oct 2014 04:41:44 PM
Relational or dimensional?
Title: Re: Case statement splitting up rows
Post by: BigChris on 22 Oct 2014 01:54:31 AM
total((count Ofc_num when product = A)) and total((count ofc_num when status = X)) perhaps? As Lynn says though, it'll depend on whether you're using relational or dimensional.
Title: Re: Case statement splitting up rows
Post by: adam_mc on 22 Oct 2014 07:42:48 AM
Again, as Lynn says Relational or Dimensional?

However, as you reference dimensions and a fact table, I'm going to make the assumption that you are in a relational package.

Therefore, it should be as simple as setting the Aggregate Function of your fact based calculations to be Total.

Hope this helps.
Adam.
Title: Re: Case statement splitting up rows
Post by: JP1981 on 22 Oct 2014 02:12:53 PM
thanks a lot to you all.... i was missing that total..it fixed it...infact i ended up making the calc in the FM :)