Forum Discussion

fawzy87's avatar
fawzy87
New Member
3 years ago
Solved

Add Measures to column cell

Hi, is it possible to reference a measure to column cell? I have many measures and I want to add them in a specific column where every cell in the column will contain different measure, for example: ...
  • parry2k's avatar
    3 years ago

    fawzy87 you can use the switch or if function to achieve this:

     

    New Performance Measure = 
    VAR __machine = SELECTEDVALUE ( Table[Machine] )
    RETURN
    SWITCH ( __machine,
       "A", [Measure 1],
       "B", [Measure 2],
       "C", [Measure 3],
       [Else Measure]
    )
       

     

    now use the above measure in the visual and it will switch based on the machine id.

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.