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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
StoryofData
Helper III
Helper III

M Launguage If Statement

How do I add another condition to this?

 

if [EmplId] <> ""
then
[IemCaseNumber]&" | "&[EmplId]&" | "&[IemParticipantName]
else ""

 

I need it to do a custom column of [IemCaseNumber]&" | "&[EmplId]&" | "&[IemParticipantName]

IF [EmplId] <> ""

    [IemCity] <> "Not Disclosed" or "Not Applicable"

 

if conditions are not met, then the cell should be blank

2 REPLIES 2
vicky_
Super User
Super User

you can use "else if" in M.

think I got it!

if [EmplId] = ""
then ""

else if
[IemCity] = "Not Applicable"
or [IemCity] = "Not Disclosed"
then
""

else
[IemCaseNumber]&" | "&[EmplId]&" | "&[IemParticipantName]

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.