Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danieldors
Contributor III
Contributor III

Count for Current Day

Hello,

I have the following expression below which Im trying to find the percentage of workers for the most current day over 15 driver for that day. Im not sure what is wrong with it.

((Sum(Aggr(If(sum([Total Driver]) > 15,[DD_Production.Date.autoCalendar.Date]={"$(=Max([DD_Production.Date.autoCalendar.Date]))", [Work Type]='Generic-Full',1),[FLA ID-Worker ID])))
/
count({<[Work Type]={'Generic-Full'}>}distinct [FLA ID-Worker ID]))

Thank you

1 Reply
rubenmarin1

Hi, maybe it's a syntax error and you want something like?:

((Sum(Aggr(If(sum([Total Driver]) > 15 and [DD_Production.Date.autoCalendar.Date]=Max([DD_Production.Date.autoCalendar.Date]) and [Work Type]='Generic-Full',1),[FLA ID-Worker ID])))

Or those conditions should be inside a set analysis, like:

((Sum({<[DD_Production.Date.autoCalendar.Date]={"$(=Max([DD_Production.Date.autoCalendar.Date]))"}, [Work Type]='Generic-Full'>} Aggr(If(sum({<[DD_Production.Date.autoCalendar.Date]={"$(=Max([DD_Production.Date.autoCalendar.Date]))"}, [Work Type]='Generic-Full'>}[Total Driver]) > 15,1),[FLA ID-Worker ID])))