Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

In a PowerBI matrix visual, I want to have the average value instead of the subtotals and the total

I am using a PowerBI matrix visual to visualize some data and as I need the date hierarchy, I need to use the matrix visual.

However, my requirement is to get the "average" value in the subtotals and in the total instead of the total "sum".

Is it possible to do this in PowerBI or is there any alternative way or visual that can be used instead? I have attached a screenshot for reference.

Any help would be appreciated, thank you!MatrixAverage.jpg

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , You can use isinscope to change the subtotals and grand totals

 

https://xxlbi.com/blog/new-dax-function-isinscope/

 

If you need Avg of Sum,

refer

https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013

 

Include City = AVERAGEX(VALUES(Geography[City]), [gross])
Include City 1 = AVERAGEX(SUMMARIZE(Sales,Geography[City],"_1", [gross]), [_1])
Include City 2 = AVERAGEX(Addcolumns (SUMMARIZE(Sales,Geography[City]),"_1", [gross]), [_1])

View solution in original post

It would be something along the lines of:

Average sub/totals = IF(ISINSCOPE(Table[Year]), [Sum Measure], [Average Measure])





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you so much for your suggestions, I was able to find a solution eventually using these suggestions @amitchandak @PaulDBrown 

amitchandak
Super User
Super User

@Anonymous , You can use isinscope to change the subtotals and grand totals

 

https://xxlbi.com/blog/new-dax-function-isinscope/

 

If you need Avg of Sum,

refer

https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013

 

Include City = AVERAGEX(VALUES(Geography[City]), [gross])
Include City 1 = AVERAGEX(SUMMARIZE(Sales,Geography[City],"_1", [gross]), [_1])
Include City 2 = AVERAGEX(Addcolumns (SUMMARIZE(Sales,Geography[City]),"_1", [gross]), [_1])

Anonymous
Not applicable

Sorry @amitchandak, I am not sure I completely understand how ISINSCOPE can be used to get an average in a column in a matrix. Can you please elaborate, I would be grateful, thank you!

It would be something along the lines of:

Average sub/totals = IF(ISINSCOPE(Table[Year]), [Sum Measure], [Average Measure])





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.