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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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)

Weight_With_Moisture =
SUMX(
    SUMMARIZE(DimLine, DimLine[LineName],DimLine[Line], "XY", SUM(FactWeight[Weight in tonnes])),
     [XY])
 
2)
Weight_Without_Moisture =

var Moisture= SELECTEDVALUE(FactMoisture[Moisture %])

var MoistureAbsencePercentage=
1-DIVIDE(Moisture,100)

var Value_Without_Moisture=
FactWeight[Weight_With_Moisture]*MoistureAbsencePercentage

return
Value_Without_Moisture.
 
......................................................
Here are 3 images of the demo Reports

 

Picture 1:Picture 1:Picture 2:Picture 2:

Picture 3Picture 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 . 

 

1 ACCEPTED SOLUTION

@Anonymous 

Daniel29195_0-1707334312110.png

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! 🤠

View solution in original post

6 REPLIES 6
Daniel29195
Community Champion
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! 🤠

 

Anonymous
Not 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.  
image.png

 

Corrected Measure =

var ds=
ADDCOLUMNS(
    SUMMARIZE(
        FactMoisture,
        DimLine[Line],
        FactMoisture[Moisture %]),
        "X", FactWeight[Weight_With_Moisture]*(1-DIVIDE(FactMoisture[Moisture %],100))
)
return
SUMX(ds, [X])


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
Not applicable

Hi @Daniel29195 

 

Here is the link for Power BI demo file.

Thank you in advance

 

 

 

 ValueWithoutMoisture.pbix

 

@Anonymous 

Daniel29195_0-1707334312110.png

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
Not applicable

Hello @Daniel29195 ,

Thank you, it worked 🙂

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.