Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
suhasarchak
Partner - Contributor III
Partner - Contributor III

Count of Non frequent Location

Hi,

My table in Qlik Sense app is as below:

Location Date Flag
AA 3/4/2022 1
AA 4/4/2022 0
AA 5/4/2022 0
AA 6/4/2022 1
BB 3/4/2022 1
BB 4/4/2022 1
BB 5/4/2022 1
BB 6/4/2022 1
CC 3/4/2022 0
CC 4/4/2022 0
CC 5/4/2022 0
CC 6/4/2022 0

 

The expected output is to add a coulumn to the right of Flag column with Count of distinct locations in these 4 days which are not having atleast having one Flag=1 and also show the Pie Chart with Location and dimension and Measure as this Count. In this example expected to count Location is 1 as C only satisfies this condition.

Looking for the set analysis expression which would solve this. Furhter complcation is that the date range is derived by a variable which will define the number of days in the date range, like 4 days, 5 days, 10 days.

Thank you,

Suhas

 

Labels (1)
1 Reply
sergio0592
Specialist III
Specialist III

Hi,

For point 1, try with :

sum(aggr(if(sum(Flag)=0,1,0),Location))