Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi guys,
I have a measure (ROA) which is calculated by dividing revenue with clients NET position. I need a way to display this measure by summing the last 12 months from its result.
However as you can see on the total bottom right it is aggregating it by division from the total.
Any ideas on how to solve this? Thanks in advance.
Solved! Go to Solution.
Hi, @diogodasilva
Do you want the total ROA to show the sum of divisions for the last 12 months? You can try the following methods.
Sample data:
Measure:
ROA = DIVIDE(SUM('Table'[Valor]),SUM('Table'[Net]))
Final ROA =
Var N1=SUMMARIZE(FILTER(ALL('Table'),[Month]<=MAX('Table'[Month])),[Month],"Sum",[ROA])
Var N2=TOPN(12,N1,[Month],DESC)
Var Cumulative12month=SUMX(N2,[Sum])
return
IF(HASONEVALUE('Table'[Month]),[ROA],Cumulative12month)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @diogodasilva
Do you want the total ROA to show the sum of divisions for the last 12 months? You can try the following methods.
Sample data:
Measure:
ROA = DIVIDE(SUM('Table'[Valor]),SUM('Table'[Net]))
Final ROA =
Var N1=SUMMARIZE(FILTER(ALL('Table'),[Month]<=MAX('Table'[Month])),[Month],"Sum",[ROA])
Var N2=TOPN(12,N1,[Month],DESC)
Var Cumulative12month=SUMX(N2,[Sum])
return
IF(HASONEVALUE('Table'[Month]),[ROA],Cumulative12month)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@diogodasilva This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
143 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
206 | |
90 | |
61 | |
59 | |
57 |