Wednesday, October 28, 2026

Calculating %age in Power BI

 Say we have below table :


Now if we want to calculate the %age of expenses, we need the total expense.



Then say we want to calculate %age total expense for Transportation, then we can use below formula:

=5000/47500 = 0.105 = 10.5%

Now to calculate the total expense in DAX, we need to use "ALL" function

Total Expenditure(ALL) = CALCULATE([TotalExpenditure] , ALL(Sheet1[Category]))

Then %age can be calculated as below:
% Total Expenditure = DIVIDE([TotalExpenditure], [Total Expenditure(ALL)], 0)

No comments:

Post a Comment