cancel
Showing results for
Did you mean:
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!

2 ACCEPTED SOLUTIONS
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])

New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!
Super User

It would be something along the lines of:

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

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

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

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])

New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!
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!

Super User

It would be something along the lines of:

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

In doing so, you are also helping me. Thank you!

Proud to be a Super User!