1
votes

I have the following format of data:

Machine | Production | Percentage | Measure | SUM of Measure
M1      | 153254     | 75.3       | 203524  | 1360290
M2      | 574285     | 71.4       | 804320  | 1360290
M3      | 237549     | 67.4       | 352446  | 1360290
TOTAL   | 965088     | 71.3       | 

Machine and Production are extracted from database. Percentage has it's calculated value. Measure is calculated by formula: Production / Percentage

I need to get the SUM of Measure column and populate it for each row. If I am trying to use simple SUMX(Measure,ALLSELECTED()), I have Total of Measure: Total Production / Total Percentage, but I need only the sum of Measure column.

Any ideas?

1

1 Answers

0
votes

I created an index column using power query because an auxiliar column is needed to perform this calculation. Then i used the following measure:

SUM of Measure = 
SUMX(
    FILTER ( 
        ALL ( 'Table'), 
        'Table'[Index] <= MAX ( 'Table'[Index] ) 
    ), 
    [Measure]
)

Hope it helps you.