Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I am working on a measure that takes into consideration different points to output a Forecast for the month of 2024. I tried to work through each point, yet it seems like Avg is the part of the formula which gives me the most issues.
Here is the formula currently:
[Trend Factor]
*
NetWorkDays(Today(),MonthEnd(AddMonths(Today(),0)), vHolidays)
*
Avg({< Date = {">=$(=MonthStart(AddMonths(Today(),-12))),<=$(=Monthend(AddMonths(Today(),-12)))"}>} [Net IO])
And here is the results:
My idea is that the Avg is not aggregating well, as this is a measure that will be split through 6 sales office under a dimension of the same name.
Can somebody help me point out the problem here?
@alespooletto wrote:
Ideally, the value should be equal to the average of the Net IO for all the 6 different sales offices.
I believe you will need to add the TOTAL qualifier to your Avg function.
-Rob
It is unclear what you want to calculate. So, it is difficult to say what goes wrong.
But usually you should NOT use Avg() to calculate your average. Usually, the calculation of an average needs an intermediate iterator: Average per what?
See more on https://community.qlik.com/t5/Design/Average-Which-average/ba-p/1466654
Hi @hic , thanks for the reply.
I know because I cross checked, that the first 2 values in the formula of the measure are correct. The issue arises, as you noticed, from the AVG function.
Ideally, the value should be equal to the average of the Net IO for all the 6 different sales offices. This gets multiplied by the other 2 values in the formula. However, when I write the Avg only ( for the remaining working days of the month) of the Net IO, I get extremely low values.
@alespooletto wrote:
Ideally, the value should be equal to the average of the Net IO for all the 6 different sales offices.
I believe you will need to add the TOTAL qualifier to your Avg function.
-Rob