Forum Discussion
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:
| Line | Machine | Perfromance (measure) |
| X | A | Measure1 |
| X | B | Measure2 |
| X | C | Measure3 |
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.
1 Reply
- parry2k
Super User
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.