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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jagostinhoCT
Post Partisan
Post Partisan

Conditional column to ignore else if first is true

Hello,

 

I was trying to create a Conditional Colum expecting that if the first condition is TRUE than all the Else Ifs would be ignored but this does not seem to be happening.

 

Basically, I want to set it so that if the value on L1Tag Column equals "Transfer" then the value is set to Transfer and it stops right there.

 

See Conditional Statement below and resulting table.

What am I doing wrong?

 

Thank you

J

jagostinhoCT_0-1596375629382.pngjagostinhoCT_1-1596375635313.png

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@jagostinhoCT 

Your conditions are based two fields and it will continue to evaluate the subsequent levels as based on true/false. You can add a custom column and  use OR/AND combination to achieve this as well.

It seems you have put "Transfer" instead of "Transfers", in Value section, missing last s, correct and try, it shoudl work.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
simrantuli
Continued Contributor
Continued Contributor

Hi @jagostinhoCT,

You forgot an "s" in Transfers and that's why it is not working properly for you.

I tried the same conditional column as you and it worked for me. Please find below the screenshot.

simrantuli_0-1596384102054.png

 

simrantuli_1-1596384122592.png

Also, I observed that you are forgetting to add a condition if the LT1Tag is not "Transfers" and the Amount is 0 i.e. the first "Else if" condition in my screenshot --> "Greater than or equal to 0". I think you should consider that also and incorporate in the column 🙂

Regards

Simran Tuli

Greg_Deckler
Super User
Super User

@jagostinhoCT That's exactly how conditional statements work. I think you forgot an "s" in Transfers


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

your column says "Transfers" not "Transfer"

Change your conditional to Contains "Transfer" or is equal to "Transfers" this will sort your issue out. 

Fowmy
Super User
Super User

@jagostinhoCT 

Your conditions are based two fields and it will continue to evaluate the subsequent levels as based on true/false. You can add a custom column and  use OR/AND combination to achieve this as well.

It seems you have put "Transfer" instead of "Transfers", in Value section, missing last s, correct and try, it shoudl work.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

of course...

"Transfers" not "Transfer"

 

Such a rookie mistake. 😞

 

Sincere apologies and thank you very much.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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