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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show correctly % of Absences in Total workforce?

Hello,

I am trying to create a chart which would show what was the percentage of absences among workforce for given weekday.

I have written such expression as a start but it is not correct as when selecting broader time range absences just cumulate and percentage rises:

count ({$<IsFuturePeriod={0}>} [#Absence Days])/count({$<IsFuturePeriod={0}>} DISTINCT %PersonnelNumber)

I am attaching the screens with data model.

Data model.PNG

chart screen.PNG

Thank you,

Mat

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

It seems normal to accumulate, isn't it?

You would need an average %.

Try something like :

avg(AGGR(count ({$<IsFuturePeriod={0}>} [#Absence Days])/count({$<IsFuturePeriod={0}>} DISTINCT %PersonnelNumber),%DATE) )


BR


Serhan

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hello,

It seems normal to accumulate, isn't it?

You would need an average %.

Try something like :

avg(AGGR(count ({$<IsFuturePeriod={0}>} [#Absence Days])/count({$<IsFuturePeriod={0}>} DISTINCT %PersonnelNumber),%DATE) )


BR


Serhan

Not applicable
Author

Thanks Serham, that is what I needed.