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.
Hi Everyone,
I want to show Average instead of row total in matrix visual. Please help me with this.
FYI, Please find the below attached snap for my requirement.
Link for sample data:
https://docs.google.com/spreadsheets/d/1ywvspnfl7O2DscU7HLRzDPMHd0iYAPwU/edit#gid=188546882
Thanks in Advance.
@amitchandak @PaulDBrown @Vvelarde @MarcelBeug @Greg_Deckler @johnt75
Solved! Go to Solution.
Hi @Anonymous ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can create a measure as below to replace the original one...
Measure =
VAR _seldis =
SELECTEDVALUE ( 'Table'[Discipline] )
VAR _sellevel =
SELECTEDVALUE ( 'Table'[Level] )
VAR _sum =
SUM ( 'Table'[Availability] )
VAR _ssum =
CALCULATE (
SUM ( 'Table'[Availability] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Discipline] = _seldis
&& 'Table'[Level] = _sellevel
)
)
VAR _scount =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Week] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Discipline] = _seldis
&& 'Table'[Level] = _sellevel
)
)
VAR _avg =
DIVIDE ( _ssum, _scount )
RETURN
IF ( ISINSCOPE ( 'Table'[Week] ), _sum, _avg )
In addition, you can refer the following links to get it.
Use IsInScope to get the right hierarchy level in DAX
If the above ones still not help you get the expected result, please provide more raw data in the table (exclude sensitive data) with Text format and your expected result with backend logic and special examples.It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Anonymous ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can create a measure as below to replace the original one...
Measure =
VAR _seldis =
SELECTEDVALUE ( 'Table'[Discipline] )
VAR _sellevel =
SELECTEDVALUE ( 'Table'[Level] )
VAR _sum =
SUM ( 'Table'[Availability] )
VAR _ssum =
CALCULATE (
SUM ( 'Table'[Availability] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Discipline] = _seldis
&& 'Table'[Level] = _sellevel
)
)
VAR _scount =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Week] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Discipline] = _seldis
&& 'Table'[Level] = _sellevel
)
)
VAR _avg =
DIVIDE ( _ssum, _scount )
RETURN
IF ( ISINSCOPE ( 'Table'[Week] ), _sum, _avg )
In addition, you can refer the following links to get it.
Use IsInScope to get the right hierarchy level in DAX
If the above ones still not help you get the expected result, please provide more raw data in the table (exclude sensitive data) with Text format and your expected result with backend logic and special examples.It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Thanks for your solution.
Hi @Anonymous ,
You can create a measure and add it to matrix.
Then measure:
Proud to be a Super User!
Hi @pratyashasamal ,
Thanks for your solution. I have to create a measure by taking the refference of your measure, its working.
But, it gives average in column total, but my requirement is columns should be sum and i want to show row total as average.
FYI, please find the above attachment, the red highlited total column should be average, and remaining same as sum.
Hi @Anonymous ,
Try this type of measure once ,
Measure = IF(ISINSCOPE('Table'[category]),SUM('Table'[count]),AVERAGE('Table'[count]))
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Proud to be a Super User!
Hi @Anonymous ,
Please check if this link is helpful for you : https://stackoverflow.com/questions/64869614/how-to-show-avg-value-in-matrix-widget-along-with-total-in-power-bi
https://stackoverflow.com/questions/66658350/power-bi-add-total-average-column-in-matrix
Thanks ,
Pratyasha Samal
Proud to be a Super User!
Hi @Anonymous ,
Hope you were able to resolve the issue ?
Thanks ,
Pratyasha Samal
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |