I’m pretty confuse on how to use DAX Average function, although I did look at your Youtube about Average per transaction. Been reading and try to digest the reading material from SQLBI about context transition, but I still not getting what I want.
The thing is, I have a transaction data, which has some duplicate value which causing the amount to be doubled. The data is something like this :
In above table, SO-03 is doubled . This is because the location is actually from other table and after join table, that is the result.
So I think, I just create a measure and average the amount, that would solve the problem. It turned out it’s not that easy.
At first I have a simple measure for the total :
[Total Amount] = SUMX(
Sales[Price] * Sales[Qty])
After I have duplicate rows, I think I can create this measure :
[AVG Total Amount] = AVERAGEX(
However when I put in Table visual, just display the Sales Id and that Measure, I saw the amount is doubled.
There is some resources suggesting to put CALCULATE in that [Total Amount], but the result is the same.
Can you help me to understand more about this issue ?
Many thanks in advance.