Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count for a dimension with a IF

I've got a dimension : code AND my Fact is a value:

For example I have :

code : value

AE : 16

AE : 65

DF : 125

FG : 185

FG : 43

GD : 874

If the sum by code > 192 I want to count..

for example here I should have : 2 because sum of FG from one hand and sum of GD from the other hand are booth > 192.

I tried something like : count(aggr(h_eg_td>192,code_enseignant)) but it doesn't work..

Thks

2 Replies
Not applicable
Author

Hi there, try this:

=count({$<code = {"=aggr(sum(value),code) > 192"}>} distinct code)

Regards

chris_johnson
Creator III
Creator III

Hi,

Try:

sum ( if( value > 192, 1, 0))

That should do it. This way it will assign 1 to the rows where the value is over 192 and then sum them all up.

Regards,

Chris