Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
LynseyM
Partner - Contributor
Partner - Contributor

KPI for Count with Conditions on Aggregated Data

I have a table which is returning all Timecard_ids where the following is true: 

OTL_FLAG = '1'and Sum(TOTAL<[Employee Number],[OTL Start Time]> [OTL Hours Entered]) >=$(vL.WeeklyHours)

$(vL.WeeklyHours) is a variable containing a number as default but which can be updated by the user using the Variable Input chart in the Qlik Dacount if conditionshboard bundle.

I am now trying to produce a KPI to show a count of the timecard_ids returned in the table and therefore meet the above conditions but I am not able to get the count syntax correct. 

I would be grateful for any help.

Labels (2)
3 Replies
vinieme12
Champion III
Champion III

 As below

 

=Count({<

[Employee Number]={"=Sum(TOTAL<[Employee Number],[OTL Start Time]> [OTL Hours Entered]) >=$(vL.WeeklyHours)"}, OTL_FLAG={'1'}

>}Distinct [Employee Number])

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
LynseyM
Partner - Contributor
Partner - Contributor
Author

Hi,

Thanks for the response. I have tried what you suggested but it is not working. If I select using one specific [OTL Start Time} and OTL_FLAG = 1 then the count does work but without these selections it is returning too many records.

Do you have any further suggestions?

Thanks

Mark_Little
Luminary
Luminary

Is not just using the incorrect fields.

=Count({<

[Employee Number]={"=Sum(TOTAL<[Employee Number],[OTL Start Time]> [OTL Hours Entered]) >=$(vL.WeeklyHours)"}, OTL_FLAG={'1'}

>}Distinct Timecard_ids)