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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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