Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I hope someone can help me out here. I do not get correct Average and Median numbers for a simple case of two prices in 8 rows.
For example:
Date Price
04.01.2016 70.88
14.01.2016 70.88
20.01.2016 70.88
21.01.2016 70.88
08.02.2016 68.60
22.02.2016 68.60
07.03.2016 68.60
14.03.2016 68.60
and I get an Average of 69.67 and Median of 68.60 instead of 69.74 for both.
I use this expression to get the average: aggr(avg(Price), F1, F2)
Thanks
avg(Price) alone what does it give you?
Have you tried straight average?
Avg(Price)
The same. I use Aggr() because I have multiple records in a pivot table.
I believe it's not useful to discuss a deviation between your expectation and the results if we don't know the setting you are using, e.g. how F1 and F2 relate to Price field.
So please clarify by uploading a small sample QVW.
Yes, I like this as well. It is not that easy as this is only one of tens of objects used in a big QVapp.
I'll see
Just a subset of much more dimensions and measures available. Where is the catch?
Hard to tell exactely, but I guess it's the differenc between your transactional average and the average grouped by your dimensions:
I believe what you really want is the average based on the Sum(Sales) / Sum(Qty).
Attached is one example with strange output, but in this case the Avg() returns correct number.
Could you detail what you consider a strange output?
Note that sum(Qty*Price) / Sum(Qty) is using a weight of Qty.