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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
New-Qlik
Creator III
Creator III

Simple count

Hello Everyone ,

I have to count no of 'Bad' for product

Condition for Good bad is like :If(Cause Price = 'ZYZ', 'Good', 'Bad') , its same for rest of causes in table.

I want to generate last column ie "Total No of  causes" using existing causes column where its BAD

 

Product IDCause PriceCause DescriptionCause OwnerCauseMArketTotal No of causes
1GoodBadBadBad3
2BadGood GoodBad2
3GoodBadGoodGood1
4GoodBadBadGood2
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You can use rangesum() like this:

=-Rangesum(
[Cause Price] ='Bad',
[Cause Description]='Bad',
[CauseMArket] ='Bad',
[Cause Owner] ='Bad'
)

 

image.png

View solution in original post

4 Replies
Vegar
MVP
MVP

You can use rangesum() like this:

=-Rangesum(
[Cause Price] ='Bad',
[Cause Description]='Bad',
[CauseMArket] ='Bad',
[Cause Owner] ='Bad'
)

 

image.png

Vegar
MVP
MVP

If you rather want to use your Cause Price = 'ZYZ' logic you can do like this instead,

 

=-Rangesum(
[Cause Price] <> 'ZYZ',
[Cause Description] <> 'ZYZ',
[CauseMArket]  <> 'ZYZ',
[Cause Owner]  <> 'ZYZ'
)
New-Qlik
Creator III
Creator III
Author

Thanks It worked. 

can you explain the reason for using '-' in front.

 

 

Vegar
MVP
MVP

The boolean check returns -1 if true(). By adding - in front turns it into positive number.