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

Calculating total grouped on absent field.

Currently have a chart which sums the number of hours assigned to a resource by week and applies a flag if the hours for the week exceed 5 (see below)

Capture.PNG

That I would like is a chart that only contains the week ending and the number of times that the flag has been breached that week. Using the above sample we would get the following result.

personnel_week_endingtotal_breaches
2016-07-171
2016-07-242

Any ideas on the formula required to calculate the total_breaches expression while removing the resource_name dimension from the chart would be much appreciated?

1 Solution

Accepted Solutions
Not applicable
Author

Thanks for the reply Sunny that was close what actually worked was:

Sum(If(Aggr(Sum(hrs),resource_name,personnel_week_ending)>5,1,0))

View solution in original post

4 Replies
florentina_doga
Partner - Creator III
Partner - Creator III

see this

sunny_talwar

May be like this as your expression:

Sum(Aggr(If(Sum(hrs) > 5, 1, 0), resource_name, personnel_week_ending))

Not applicable
Author

Thanks for the reply Sunny that was close what actually worked was:

Sum(If(Aggr(Sum(hrs),resource_name,personnel_week_ending)>5,1,0))

Not applicable
Author

nailed it thank you