COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: johangel on 26 Jul 2013 03:42:47 AM

Title: first positive number
Post by: johangel on 26 Jul 2013 03:42:47 AM
I have a list with numbers in.I need to keep the row with the first positive number (also the smallest)  in .
How??,
grts
Title: Re: first positive number
Post by: RKMI on 26 Jul 2013 03:41:05 PM
min([data item]) > 0

Title: Re: first positive number
Post by: johangel on 29 Jul 2013 04:29:51 AM
it is not working, probably because the row is a result of a "running count" function....
I have next example:
difference between 2running counts
-95
-83
-57
-20
13
19
I need the row with the first positive number? (the row with 13....)
johan
Title: Re: first positive number
Post by: RKMI on 29 Jul 2013 12:07:40 PM
Can you try specifying the solve order to do the running counts first and after do the min function? (or) you even make a subquery do the running count in one query and in the subquery specify the min ()>0 just another approach avoiding to specify all solve order.
Title: Re: first positive number
Post by: johangel on 08 Aug 2013 02:20:54 AM
Thanx, it is working with a subquery (the only thing to do is to set the properties of the variables ==> aggregate none)
johangel