Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |