Forum Discussion
aspitalnick
2 years agoFrequent Visitor
DAX conditional formattiong help
What am I doing wrong
CLS_cond_form = VAR BM_ =SELECTEDVALUE('Acadiance 1-6'[Benchmark])
VAR Grade_ = SELECTEDVALUE('Acadiance 1-6'[Grade])
VAR CLS_ = SELECTEDVALUE('Acadiance 1-6'[NWF-CLS])
Return
SWITCH
(True(),
Grade_ = "1" && BM_ = "BM1" && CLS_ <30, "100",
Grade_ = "1" && BM_ = "BM1" && CLS_ <= 1000, "102",
Grade_ = "2" && BM_ = "BM1" && CLS_ <40, "103",
Grade_ = "2" && BM_ = "BM1" && CLS_ >60, "104",
Grade_ = "4" && BM_ = "BM2" && CLS_ <20, "106",
Grade_ = "4" && BM_ = "BM2" && CLS_ >40, "107",
BLANK()
)
2 Replies
- PijushRoyCommunity Champion
Hi aspitalnick
Is Grade text field or number field
You care using Grade as Text field Grade = "1"CLS_cond_form = VAR BM_ =SELECTEDVALUE('Acadiance 1-6'[Benchmark]) VAR Grade_ = SELECTEDVALUE('Acadiance 1-6'[Grade]) VAR CLS_ = SELECTEDVALUE('Acadiance 1-6'[NWF-CLS]) Return SWITCH (True(), Grade_ = 1 && BM_ = "BM1" && CLS_ <30, "100", Grade_ = 1 && BM_ = "BM1" && CLS_ <= 1000, "102", Grade_ = 2 && BM_ = "BM1" && CLS_ <40, "103", Grade_ = 2 && BM_ = "BM1" && CLS_ >60, "104", Grade_ = 4 && BM_ = "BM2" && CLS_ <20, "106", Grade_ = 4 && BM_ = "BM2" && CLS_ >40, "107", BLANK() )
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin- aspitalnickFrequent Visitor
Grade is text