Percentage (%) of Total using DAX in PowerBI

Hello friends! Today we’ll be learning to calculate percentage of total using DAX in Power BI.

There is inbuilt function in Power BI but sometimes it is required to calculate the percentage of total using DAX.

Data

Data is following format

CategorySales 2018Sales 2019
A199169
B154138
C161186
D191193
E175189
F142171
G181160

DAX query

% of total 2018 using DAX = SUM(Sales[Sales 2018])/CALCULATE(SUM(Sales[Sales 2018]),ALL(Sales))
% of total 2019 usign DAX = SUM(Sales[Sales 2019])/CALCULATE(SUM(Sales[Sales 2019]),ALL(Sales))

Final Table

Keep visiting Analytics Tuts for more tutorials.

Thanks for reading! Comment your suggestions and queries


8 comments

Leave a Reply

Your email address will not be published. Required fields are marked *