Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggregate values instead recalculate up a hierarchy

I have a 3 level hierarchy (3 related fields); Region, Role and Worker

I'm calculating the number of work days for each Worker at the lowest level and this is correct.

Is it possible to aggregate these calculated values and not have the formula reapplied and recalculated at the higher levels of Role and Region

vFirstSelectedPeriod = min([Period])

vLastSelectedPeriod = max([Period])

vWorkDays = NetWorkDays($(vFirstSelectedPeriod), $(vLastSelectedPeriod))

2017-11-03_115944.jpg

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum(Aggr(NetWorkDays($(vFirstSelectedPeriod), $(vLastSelectedPeriod)), Region, Role, Worker))

View solution in original post

3 Replies
sunny_talwar

May be this

Sum(Aggr(NetWorkDays($(vFirstSelectedPeriod), $(vLastSelectedPeriod)), Region, Role, Worker))

Anonymous
Not applicable
Author

thank so much. this is such a useful channel for "newbies" like me.

luismadriz
Specialist
Specialist

Nicely explained Neil!

With explanations like this you'll get the attention of the gurus such as Sunny. I still haven't fully grasped Aggr but I'll get there...

Cheers,

Luis