# New to Qlik Sense

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

Announcements
cancel
Showing results for
Did you mean:
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))

1 Solution

Accepted Solutions
MVP

May be this

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

3 Replies
MVP

May be this

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

Contributor III
Author

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

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