Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have this dataset
| Sector | Item | Value | Average (calculate) | Rank (calculate) |
| Gold | E | 89 | 66.6 | 1 |
| Gold | C | 82 | 66.6 | 2 |
| Gold | D | 69 | 66.6 | 3 |
| Gold | B | 51 | 66.6 | 4 |
| Gold | A | 42 | 66.6 | 5 |
| Silver | F | 19955 | 15043.2 | 1 |
| Silver | H | 16487 | 15043.2 | 2 |
| Silver | G | 14927 | 15043.2 | 3 |
| Silver | J | 12103 | 15043.2 | 4 |
| Silver | I | 11744 | 15043.2 | 5 |
The way this works is, the user selects "Silver" or "Gold" from the slicer and the items get ranked dynamically. Also, the average for that particular product category, gold or silver, should reflect in a different column.
I was able to calculate the rank but need guidance on calculating the average.
How do I calculate the average?
Thank you!
Piyush
Solved! Go to Solution.
Hi @PiyushBQ ,
Try create measure like this:
Measure = CALCULATE(AVERAGE('Table'[Value]),ALLSELECTED('Table'))Or calculated column:
Column = CALCULATE(AVERAGE('Table'[Value]),ALLEXCEPT('Table','Table'[Sector]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PiyushBQ wrap SUM in CALCULATE
Avg = AVERAGEX ( Table, CALCULATE ( SUM ( Table[Column] ) ) )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.
Thank you for taking the time out @parry2k .
I tried doing it but it didn't work. Please check the screenshot.
@PiyushBQ are you adding this as a measure or column?
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.
Hi @parry2k I had previously written it as a measure.
But adding it as a column was fraught with problems too. Here's a screenshot of the error when added as a column.
Hi @PiyushBQ ,
Try create measure like this:
Measure = CALCULATE(AVERAGE('Table'[Value]),ALLSELECTED('Table'))Or calculated column:
Column = CALCULATE(AVERAGE('Table'[Value]),ALLEXCEPT('Table','Table'[Sector]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.