Forum Discussion

LeahZhang's avatar
LeahZhang
Microsoft Employee
4 years ago
Solved

Incorrect Measure Totals

Dear Team, 

 

I run into a problem with Incorrect Measure Totals and seek expert advise on it. Th

totalScore/ plantTotalweight are both measures

plantScore = totalScore * plantTotalweight 

 

 

  • LeahZhang 

    Can you try the following measure for plantScore

    plantScore =
    SUMX ( VALUES ( tablename[swr_name] ), [totalScore] * [plantTotalweight] )
    

3 Replies

  • LeahZhang 

    Can you try the following measure for plantScore

    plantScore =
    SUMX ( VALUES ( tablename[swr_name] ), [totalScore] * [plantTotalweight] )
    
    • LeahZhang's avatar
      LeahZhang
      Microsoft Employee

      Thanks Fowmy, it works!!😁

      Just wonder what is the difference between SUMX() and just writing function.

      • Fowmy's avatar
        Fowmy
        Super User

        LeahZhang 

        SUMX iterates over the given table in the 1st argument and performs a row-by-row calculation which is needed in your total.
        SUM takes the visible amount in the filter context.