Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello - I am trying to write a what I think is a simple dax statement however I always end up with an error. I looked at a blog which provides the same type of logic however I cannot get mine to work. Please Help, what am I doing wrong?
SWITCH(SELECTEDVALUE(SAMPLE_TABLE[PROJECT_HEALTH],"Red","Red","Green","Green",BLANK(),"Complete", ""))
Thanks for any help!
Solved! Go to Solution.
SWITCH(
SELECTEDVALUE( SAMPLE_TABLE[PROJECT_HEALTH] ),
"Red", "Red",
"Green", "Green",
BLANK(), "Complete",
""
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
SWITCH(
SELECTEDVALUE( SAMPLE_TABLE[PROJECT_HEALTH] ),
"Red", "Red",
"Green", "Green",
BLANK(), "Complete",
""
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thank you so much. Something so easy and I seem to still struggle.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 150 | |
| 106 | |
| 65 | |
| 36 | |
| 36 |