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.
In a matrix visual I want to change the Grand Total field to Grand Average. For example.
Solved! Go to Solution.
Hi @Girish_P ,
Modify your measure as below:
avg1z =
var _sum=SUMX(FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])&&'Sheet1'[Row Labels]=MAX('Sheet1'[Row Labels])),'Sheet1'[qnt])
var _distinctcount=CALCULATE(DISTINCTCOUNT(Sheet1[Row Labels]),FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])))
Return
IF(ISINSCOPE(Sheet1[Row Labels]),_sum,DIVIDE(SUMX(FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])),'Sheet1'[qnt]),_distinctcount))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi,
Total = SUM(Sheet1[qnt])
Measure = AVERAGEX(VALUES(Sheet1[Row Labels]),[Total])
Hope this helps.
Try these measures
https://1drv.ms/u/s!AuHFzkBFHhqqga9TApvSulUpiJ9hwA?e=HANo68
Thanks for your replies. but the solution is not clear. attaching test pbix for your reference. can you please implement and post it.
Hi @Girish_P ,
Create a measure as below:
avg1 = IF(ISINSCOPE(Sheet1[Row Labels]),MAX('Sheet1'[qnt]),AVERAGEX(FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])),'Sheet1'[qnt]))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@v-kelly-msft thanks for your reply.
but looks like its taking Max at row level instead of sum.
pbix link :..
Hi,
Total = SUM(Sheet1[qnt])
Measure = AVERAGEX(VALUES(Sheet1[Row Labels]),[Total])
Hope this helps.
Try these measures
Hi @Girish_P ,
Modify your measure as below:
avg1z =
var _sum=SUMX(FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])&&'Sheet1'[Row Labels]=MAX('Sheet1'[Row Labels])),'Sheet1'[qnt])
var _distinctcount=CALCULATE(DISTINCTCOUNT(Sheet1[Row Labels]),FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])))
Return
IF(ISINSCOPE(Sheet1[Row Labels]),_sum,DIVIDE(SUMX(FILTER(ALL(Sheet1),'Sheet1'[Day]=MAX('Sheet1'[Day])),'Sheet1'[qnt]),_distinctcount))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Try measure like
avergageX(values(Table[Row Label]),[Day1])
avergageX(values(Table[Row Label]),sum(Table[Day1]))
Create the measure which is showing values (10,20,30 ...) with Average instead of SUM. so it will show 10,20,30 ... remain same since it is lowest level of granularity and it will show Average at grand total .
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |