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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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