Forum Discussion
Conditional lookup
- 4 years ago
NewbieJono you should transform the lookup table with these columns and then should be easy, basically each row will become 3 rows, one for green, one for orange, and another one for red.
Work Stream
Min Value
Max Value
Color Value
✨ 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 efforts 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.
- 4 years ago
NewbieJono see attached and tweak it as you see fit. I just changed the value in lookup table to see different colors:
✨ 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 efforts 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.
NewbieJono well you will not create the relationship but use the following DAX code to get the respective color:
Color =
VAR __DaysOld = Table1[Days Old]
VAR __color =
CALCULATE (
MAX ( 'LookupTable'[Color] ),
__DaysOld >= 'LookupTable'[Min],
__DaysOld <= 'LookupTable'[Max]
)
✨ 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 efforts 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.
sorry for being stupid bit how would this account for the different rules for different workstreams.
is there any way this could be done as a calculate coloumn