Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
Solved! Go to Solution.
@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])
It would be something along the lines of:
Average sub/totals = IF(ISINSCOPE(Table[Year]), [Sum Measure], [Average Measure])
Proud to be a Super User!
Paul on Linkedin.
Thank you so much for your suggestions, I was able to find a solution eventually using these suggestions @amitchandak @PaulDBrown
@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])
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])
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |