Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following nested if statement to count specific items in a table...
if(if([Status]='Completed',Count([Req #]))=1,Count([Req #]))
How can I get a count of the results it returned?
I am correct in saying your existing measure...
if(
if(
[Status]='Completed',
Count([Req #])
) = 1,
Count([Req #])
)
be restated like so:
if(
Count({<[Status]={'Completed'}>} [Req #]) = 1,
Count([Req #])
)
Now you want to count the results which that returns.
So, like Vegar suggested, you should be able to get the count of the results by wrapping it in a sum:
Sum( Count({<[Status]={'Completed'}>} [Req #]) = 1 ) * -1
The numerical representation of TRUE() is '-1', and FALSE() is '0'. So you can sum the true values and multiply by -1 to get the count.
I still get the following:
Sum( aggr( count({<[Status]={'Completed'}>} [Req #]) = 1, [Req #] ) ) * -1