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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of value from Date to Period

Hello,

I have made this expression :

sum (if(EmpDate <= Date, if(OutofEmp = '31-12-2099',  Contracturen)))/40

It then shows the Contracturen for every day in a given period. But when I remove Date from the Dimension in my Pivot table the Contracturen from all the days are summed up. So instead of displaying 39,75 it shows 1007,3.

How can I make it possible to show 39,75 for a period?

1 Reply
Not applicable
Author

I found the solution for this: to display the right number use aggr on all the added dimensions:

avg (aggr(sum (if(EmpDate <= Date, if(OutofEmp = '31-12-2099',  Contracturen)))/40,Department, Period, Date, Projectnummer, Projectnaam))