Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
shanky1907
Creator II
Creator II

Count of users according to Time

Hello,

I have one requirement where i need to show Count of users with 80-100 hours of Time Duration in a month. The filed is calculated on a day to day basis. and Come as TimeDuration.

When one whole month is selected. Then in expression the below expression doesn't work:

=If(sum(TimeDuration)>288000 AND sum(TimeDuration)<=360000,
num(count({<TimeDuration={">288000<=360000"}>}distinct UserId),'#,##0'),'-')

Because in the set modifier the sum(TimeDuration) doesn't work. Can you please suggest an approach

 

1 Solution

Accepted Solutions
sunny_talwar

@shanky1907 try this

Num(Count({<UserId = {"=Sum(TimeDuration) > 288000 and Sum(TimeDuration)<= 360000"}>}DISTINCT UserId), '#,##0')

View solution in original post

3 Replies
sunny_talwar

@shanky1907 try this

Num(Count({<UserId = {"=Sum(TimeDuration) > 288000 and Sum(TimeDuration)<= 360000"}>}DISTINCT UserId), '#,##0')
shanky1907
Creator II
Creator II
Author

Fantastic as always.

sunny_talwar

Hahaha thanks, glad I was able to help @shanky1907