Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
clondono
Creator III
Creator III

Count if

Hello community,

I need to calculate the number of requests that have gone through two selected steps.  There are a total of 8 steps in the lifecycle and a request may go through some of the steps but not trough other steps. 

What I need is the total count of distinct requests that at a given time have gone through "both" selected steps and their status is closed.

I'm using:

     Count({$<STATUS = {'Closed'}>}DISTINCT REQUEST_ID)


but this expression gives me the count of requests that have been in either step. For example if I filter by step 3 and 4 for FY16, it should return a count of 1 and show only May-2016 since there is only one request (#8216) that have been in both step3 and step4.  Instead it is returning the count of all steps that have been in one or the other step.

1.png



Any help is appreciated!

Carlos

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

Count({$<REQUEST_ID = {"=Count(STEP) = GetSelectedCount(STEP)"}>}DISTINCT REQUEST_ID)


Capture.PNG

View solution in original post

5 Replies
sunny_talwar

May be try this:

Count({$<REQUEST_ID = {"=Count(STEP) = GetSelectedCount(STEP)"}>}DISTINCT REQUEST_ID)


Capture.PNG

clondono
Creator III
Creator III
Author

Thank you Sunny.  It looks correct, I will validate and let you know!

sunny_talwar

Sure thing

clondono
Creator III
Creator III
Author

Yes, that was the perfect solution. 

Thanks Sunny!

sunny_talwar

Awesome