Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have an issue with AVERAGEX.
Using it with a simple table created for testing purposes, I get the following and expected results:
Where "at measure" is a simple SUMX(NUMBER 1 * NUMBER 2).
"at avg" is -2.92, which is confirmed by Excel, taking the whole "at measure" column and using the AVERAGEX formula.
Slicing also updates the visual and everything is in order.
However, when run against another measure, I get this:
RepTgtPINSMean is AVERAGEX(Table,Measure), where the Measure is what yields the results of that column.
Should be -0.0196, but it gives another result.
The measure is more complex but of similar domain (-x;+x). They are displayed as % but are decimals numbers.
So it seems that doing AVERAGEX(Table,Measure), I do not get the AVERAGEX of my more complex measure. My intuition is that context is the culprit here. However not so sure about this.
Thanks for the insights!
If your expected result is the arithmetic mean of all the measure values displayed in the column, you could try @parry2k 's solution.
Otherwise if your expected result is not that, it's difficult to tell which would be the cause as we don't know how complex the measure is. I think the logic in the expression is also a possible cause besides the context. You could try calculating the numerator and denominator separately to check whether they are calculated correctly to get what you expect.
Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
@Stemar_Aubert whatever column you are using on the rows (under black color), put that in your measure to get the unique value
AVERAGEX(VALUES(Table[Column]),Measure)
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |