Forum Discussion
Subtraction calulation
- 3 months ago
Hi Adavin,
Thank you for posting your query in the Microsoft Fabric Community Forum.I was able to reproduce your scenario in Power BI Desktop using my sample data.
Using sample grouped data for Income, Pay, Non Pay, and Subs, I created DAX measures to calculate:
- Individual grouped totals
- Overall Operation Total
- Income % against the Operation Total
The calculation returned the expected result successfully.
The percentage calculation was achieved using a DAX measure similar to:
Income % = DIVIDE( [Income Total], [Operation Total], 0 )This approach works because the grouped labels (Income, Pay, Non Pay, etc.) are aggregated categories, so the calculation should be handled through measures rather than direct subtraction/division on grouped rows.
For your reference, I am also attaching the sample .pbix file used to reproduce the scenario.
Hope this helps.
Welcome to the forums.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523