Forum Discussion

refint650's avatar
refint650
Helper III
4 years ago
Solved

% 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=klb107gzsucsazvyjjy0z8gp6

 

thanks

vs

 

 

3 Replies

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        Try this measure

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

        Hope this helps.