Reply
refint650
Helper III
Helper III
Partially syndicated - Outbound

% 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

Syndicated - Outbound

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

Syndicated - Outbound

@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

Syndicated - Outbound

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/

Syndicated - Outbound

@Ashish_Mathur 

 

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

sum of tasks/ sumof month.

Syndicated - Outbound

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/
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)