Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
odo_nogk
Contributor
Contributor

Count If

Hello Experts!

I am looking to count the instances of an if condition.

My calculation is;

if(sum([Output])>= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10) ,1,0)

I want to count how many times the true value 1 occurs.

Not sure if set analysis will make this easier?

 

Thanks!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

What dimension or dimensions are you checking these condition against? May be try this

Sum(Aggr(
  If(Sum([Output]) >= (Sum(Plan)*.90) and
     Sum([Output]) <= (Sum(Plan)*1.10), 1, 0)
, Dim1, Dim2, Dim3))

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

What dimension or dimensions are you checking these condition against? May be try this

Sum(Aggr(
  If(Sum([Output]) >= (Sum(Plan)*.90) and
     Sum([Output]) <= (Sum(Plan)*1.10), 1, 0)
, Dim1, Dim2, Dim3))