COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: gosoccer on 16 May 2017 02:26:47 PM

Title: ONE COUNTS BASED ON A CONDITION in FM MODEL (RELATIONAL)
Post by: gosoccer on 16 May 2017 02:26:47 PM
Hi folks, ;D ;D

I have a the following in my Framework Model and it is producing a 1 or 0 for each record that meets the condition.

if ( [UCM Physical View].[STATUS]  in (1,2,3) )
then (1)
else  (0)

The problem is I need to have any record that falls into (1,2,3) to have only one row as 1 and not 3 rows showing 3 1's.

  ID        STATUS      COUNT
1111       1                 1
1111       2                 1
1111       3                 3

In the other word, I need to have the following to show as one count when the (1,2,3) is met as the condition.
ID        STATUS      COUNT

Pls help if you can.

Thanks so much. :) :)

111       1                 1
1901        1111       2                 1
1902        1111       3                 3
Title: Re: ONE COUNTS BASED ON A CONDITION in FM MODEL (RELATIONAL)
Post by: gosoccer on 16 May 2017 02:55:58 PM
Or if there is a way to handle this count within the Report Studio since I'm dropping it as a measure in the Report Studio Crosstab as a Defined Cell.

:) :)
Title: Re: ONE COUNTS BASED ON A CONDITION in FM MODEL (RELATIONAL)
Post by: New_Guy on 17 May 2017 03:57:56 PM
Hi,

Will maximum status for ID work at the reportstudio or in FM? Also try a running-count as a filter and maximum status for ID as a filter.

Good luck
New guy
Title: Re: ONE COUNTS BASED ON A CONDITION in FM MODEL (RELATIONAL)
Post by: gosoccer on 17 May 2017 08:17:53 PM
I setup the Determinant in FM Model Subject Query for ID, Status, and Date. So, it seems like it's doing the trick.
Thanks,