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: 
Not applicable

Formula Gap

I have a formula written below in a text object.

num(((sum([Weekly Hours])/8/count(DISTINCT(EmployeeName&Time)))),'#,##0.0')

this results in 194.9 (Year)


I have the same formula in a pivot table as per below


sum([Weekly Hours])/8/count(DISTINCT(EmployeeName)) (Time is a group dimension (Year, Quarter, Month, etc.))


this result is 199.9 (Year)


Does anyone know why I am getting this gap?


It looks like when I filter the Time group, my calculation in the text box is slightly off when I drill down to any particular month.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

This worked...

It seemed to be a rounding issue...

num((num(round(sum([Weekly Hours])/8,1),'#,##0'))/num(count(DISTINCT([EmployeeName])),'#,##0'),'#,##0.0')

View solution in original post

3 Replies
Not applicable
Author

Is it a rounding issue?

fsimoes81
Partner - Contributor III
Partner - Contributor III

Try:

Sum(Aggr(sum([Weekly Hours])/8/count(DISTINCT(EmployeeName)),Year, Quarter, Month))

Not applicable
Author

This worked...

It seemed to be a rounding issue...

num((num(round(sum([Weekly Hours])/8,1),'#,##0'))/num(count(DISTINCT([EmployeeName])),'#,##0'),'#,##0.0')