Forum Discussion
Measure Total Issue
Hello Everyone,
I have seen many questions related to Problem with Measure Total and saw many suggestions but still i couldn't get my answer
I want to get the sum of weight of material without moisture. For that i wrote my measure. The value for individual rows are correct, but the total is wrong. The Total should be 84( Without Moisture). I tried many solutions but unfortunately didnt find any solution.
Here are 2 Measures :
1)
Picture 1:Picture 2:
Picture 3
Picture 1 --> Here i have also included Moisture% column and because of which the entries are getting doubled.
Picture 2--> Here The values of Column Weight_Without_moisture are correct but the total should be 84 instead of 100.
Picture 3--> The relationhips between the table.
Would really appreciate if somone could help me here. Thanking you in advance .
Anonymous
re = var ds= ADDCOLUMNS( SUMMARIZE( FactMoisture, DimDate[Date], DimLine[Line], FactMoisture[Moisture %]), "X", FactWeight[Weight_With_Moisture]*(1-DIVIDE(FactMoisture[Moisture %],100)) ) return SUMX(ds,[X])let me know if it works for you .
If my answer helped sort things out for you, i would appreciate a thumbs up π and mark it as the solution β
It makes a difference and might help someone else too. Thanks for spreading the good vibes! π€
6 Replies
- Daniel29195
Community Champion
Anonymous
modification of t
Weight_Without_Moisture = var ds= addcolumns( summarize( factmoisture, dimline[line], factmoisture[moisture %], FactWeight[Weight_With_Moisture] ), "@x", calculate ( factmoisture[moisture %] , 100) * FactWeight[Weight_With_Moisture] return sumx( ds, [@x]) Value_Without_Moisture.this is the logic .
some minor modifications are needed from your side , but this should work .
If my answer helped sort things out for you, i would appreciate a thumbs up π and mark it as the solution β
It makes a difference and might help someone else too. Thanks for spreading the good vibes! π€- AnonymousNot applicable
Hi Daniel29195
Thank you for your quick reply. I tried your suggestion, but it is showing me a total of 170 instead of 84.
Also in your measure you mentioned :
, FactWeight[Weight_With_Moisture]I could not write this in my measure.
Corrected Measure =
var ds=ADDCOLUMNS(SUMMARIZE(FactMoisture,DimLine[Line],FactMoisture[Moisture %]),"X", FactWeight[Weight_With_Moisture]*(1-DIVIDE(FactMoisture[Moisture %],100)))returnSUMX(ds, [X])
Could you again help me? π- Daniel29195
Community Champion
Anonymous
are you able to sharethe power bi file ?
you can upload to google drive, dropbox and share a link.
NB:
the measure that i ve wrote , is the logic of how it should be done.since i dont have an idea of the data that you have how it is spreaded.