Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
alespooletto
Creator
Creator

Why does my AVG measure give me low values instead of proper ones?

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:

alespooletto_1-1716792604886.png

 

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?

 

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


@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

View solution in original post

3 Replies
hic
Former Employee
Former Employee

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

alespooletto
Creator
Creator
Author

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. 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


@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