Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner - Creator II
Partner - Creator II

Calculate avg on Roll Up level

All,

I have a graph which calculates the avg Daily sales number per month. This is calculated by dividing the total sales for the month by the number of workdays that country has had in the month. The formula looks like this:

sum({<cost_center_function = {'Sales'}>}[amount_budget_mon])/vScale)/  avg(Workdays_Month)

This works fine on country level. But when I select a region (for example BeNeLux) instead of taking the average I takes a total. It has something to do with the avg workdays, because that should roll up (so not 22 as avg but 22+22+22 for 3 countries).

I tried the aggr function but I can't figure it out.

Hope you guys can help me!

Regards,

Paul

1 Reply
Gysbert_Wassenaar

I don't quite understand what you're trying to do. Do you want to divide by 66? I.e. by sum(aggr(avg(Workdays_Month),Country))?

Btw the parentheses in your expression don't seem to match. Did you post the complete expression?


talk is cheap, supply exceeds demand