Search code examples
powerbidax

Using the Measure instead of the new column and calculating row by row in dax power bi


I need to analyze the sensitivity of the Wage, I need to use measure instead of column to calculate row by row . For a complete explanation, I have sent a PDF and all the items in it are mentioned.

enter image description here

Thank you for explaining if this is possible or not?

I emphasize again, I don't want to use the new column and I definitely need a measure .


Solution

  • Using "Data" as your table name:

    Wage = SUMX ( Data, IF ( Data[value] > 15000, 200, 100 ) )
    

    How it works:

    • To force a measure to calculate row by row, you need to use "iterator" functions, like SUMX, AVERAGEX, etc.
    • SUMX essentially is a loop: it goes record by record in the data table, tests the IF statements, and produces results by row. Then the results are summed up.