Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to add average, min and max column to a matrix. I am a new Power BI user but I am an advanced user in Excel. I was able to accomplish what I need in Excel but I am struggling to firgure it out in Power BI
Here is what it looks like in Excel:
The data also needs to auto update as per what is displayed in the matrix. What I mean by this is that if you only select two days worth of tests it should show the average for just those two days. If you show all of the days for the tests it needs to show the average for all days.
Here is what I have so far in Power BI:
Thank you in advance for your help.
Solved! Go to Solution.
Hi, @cmckinney
There is no direct way to achieve it. As a workaround, you may try the following steps. I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may go to 'Query Editor', make 'Name' column selected, click 'Transform'=>'Unpivot Columns'=>'Unpivot Other Columns', 'Close and Apply'.
Then you need to create measures as below.
Max =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
MAX('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Min =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
MIN('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Avg =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
AVERAGE('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cmckinney
Here's a little tweak.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi, @cmckinney
There is no direct way to achieve it. As a workaround, you may try the following steps. I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may go to 'Query Editor', make 'Name' column selected, click 'Transform'=>'Unpivot Columns'=>'Unpivot Other Columns', 'Close and Apply'.
Then you need to create measures as below.
Max =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
MAX('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Min =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
MIN('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Avg =
IF(
NOT(ISINSCOPE('Table'[Date])),
CALCULATE(
AVERAGE('Table'[Value]),
ALLEXCEPT('Table','Table'[Name])
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Awesome! Thank you so much, this is a great solution. Is there anyway to remove the min, max, and average columns under each date and just have them as a total column at the end?
Hi, @cmckinney
Unfortunately, it is unavailable to remove the min, max, and average columns under each date. The workaround is an alternative to achieve your requirement.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cmckinney
Here's a little tweak.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Thank you for the feedback. That should work.
I am working on implimenting that right now but I am running into some issues. Do you know what I might be doing wrong?
Hi @cmckinney ,
expand the hierarchy.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi @cmckinney ,
this cannot currently be shown in a matrix.
Another column area would be required.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Thank you for your prompt reply.
I have also figure out how to pivot the table in the Power Query Editor view. Is there any way to add the min, max and average rows in this way?
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
68 | |
34 | |
27 | |
26 |
User | Count |
---|---|
98 | |
96 | |
60 | |
44 | |
40 |