Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 .
Solved! Go to Solution.
@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! 🤠
@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! 🤠
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 =
Could you again help me? 🙂
@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.
@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! 🤠
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |