Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
aspitalnick
Frequent 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 2
PijushRoy
Super User
Super User

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




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Grade is text

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.