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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Amelia_96
Contributor III
Contributor III

Calculate with filters

Hi, can i know how do i calculate this measure in straight table/pivot table but only for certain filter values?

for example, i want to count number of ID, only if the status is equal to 1, and the duration is less than 30 days. other status, i dont want to include in the count. then i want to divide the count with status=1, with overall count.

--> Count(ID where status = 1 & duration < 30) / Count(total ID)

But i dont know how to put it in formula to calculate for expression in table. Please help me.

Thank you so much

1 Solution

Accepted Solutions
Taoufiq_Zarra

@Amelia_96 

like ?

=Count({<status ={'1'},duration={"<30"}>} ID)/Count(total ID)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@Amelia_96 

like ?

=Count({<status ={'1'},duration={"<30"}>} ID)/Count(total ID)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Amelia_96
Contributor III
Contributor III
Author

It works! thank you !!