Forum Discussion

tuncay's avatar
tuncay
Helper III
4 years ago
Solved

Measure for each row

I want to create a measure, which is calculating something based on the row, which is shown on the table. So for "Gatecheck 1" I need another calculation than for "Gatecheck 2" for example. How can I...
  • selimovd's avatar
    4 years ago

    Hey tuncay ,

     

    there is a switch statement that you could use.

    Try it like this:

    SwithcMeasure =
    SWITCH(
        TRUE(),
        MAX( 'MyTable'[Gatecheck] ) = 1, [Measure1],
        MAX( 'MyTable'[Gatecheck] ) = 2, [Measure2],
        MAX( 'MyTable'[Gatecheck] ) = 3, [Measure3]
    )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis