Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
neil_gabin
Contributor III
Contributor III

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))

neil_gabin
Contributor III
Contributor III
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