Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
refint650
Helper III
Helper III

% Margin calculation

Hello

 

I'm doing % margin calculation(row total /grand total) which seem doesnt work with below dax expression always getting 100% for every row., uploaded sample data file in dropbox. I'm doing 2 step calulation 

 attributes are

rows  : costcenter, employee, task

columns : month(time)

Measure column values

1 Task total = calculate (sum[value], values(taskname))

2) Grand total = calculate (sum[value], values(month))

3) divide (tasktotal, grandtotal).  

https://www.dropbox.com/scl/fi/yp19gc2xupc5zr64h2zy1/Margin-data.xlsx?dl=0&rlkey=klb107gzsucsazvyjjy...

 

thanks

vs

 

 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

@Ashish_Mathur 

 

This really worked @Ashish_Mathur , but i'm looking for monthly contribution % for every task, 

sum of tasks/ sumof month.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

 

This really worked @Ashish_Mathur , but i'm looking for monthly contribution % for every task, 

sum of tasks/ sumof month.

Hi,

Try this measure

Measure 2 = divide([Values],CALCULATE([Values],all(Data[ Name]),ALL(Data[Task])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.