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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
danieldors
Contributor III
Contributor III

% Meeting Target Weekly

Hello,

 

Im trying to get the percentage of employees meeting the target of 18 per day using weekly data.

Expression to determine the avg for the week:

(Sum([Drivers Total]))
/
((((Count({<[Drivers Total]={">1"}>}distinct (Date))))))

 

Below is the expression for the daily data which works fine:


((Sum(Aggr(If
(sum({<[Work Type]={'Generic}>} [Previous Day.Drivers Total]> 17),1),[Worker ID])))
/
count({<[Work Type]={'Generic}>}distinct [Worker ID]))

 

Thank you

1 Solution

Accepted Solutions
Andrea_Bertazzo
Support
Support

Hi Danieldors,

Thanks for the question. In order to calculate the percentage of the employees meeting the target, I would calculate the number of employees meeting it, divide this by the number of employees and then multiply by 100.

If I understand correctly, the target is that the value of [DriversTotal] is greater than 17. I assume the employees are under [Worker ID].

So I would use a formula like this:

(Count({$< [Worker ID] = {"=Sum( [DriversTotal])>17"}>} [Worker ID])/Count( [Worker ID]))*100

The modifier {$< [Worker ID] = {"=Sum([DriversTotal])>17"}>} is there to select only the employees who have at least 18 DriversTotal.

I hope this helps.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂

View solution in original post

1 Reply
Andrea_Bertazzo
Support
Support

Hi Danieldors,

Thanks for the question. In order to calculate the percentage of the employees meeting the target, I would calculate the number of employees meeting it, divide this by the number of employees and then multiply by 100.

If I understand correctly, the target is that the value of [DriversTotal] is greater than 17. I assume the employees are under [Worker ID].

So I would use a formula like this:

(Count({$< [Worker ID] = {"=Sum( [DriversTotal])>17"}>} [Worker ID])/Count( [Worker ID]))*100

The modifier {$< [Worker ID] = {"=Sum([DriversTotal])>17"}>} is there to select only the employees who have at least 18 DriversTotal.

I hope this helps.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂