Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

neil_gabin
New 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

Re: Aggregate values instead recalculate up a hierarchy

May be this

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

3 Replies

Re: Aggregate values instead recalculate up a hierarchy

May be this

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

neil_gabin
New Contributor III

Re: Aggregate values instead recalculate up a hierarchy

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

luismadriz
Valued Contributor

Re: Aggregate values instead recalculate up a hierarchy

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

Community Browser