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
yvescn1
Frequent Visitor

How does the hierarchy of if statement work in custom column? help with my code

Hi , I have tried doing so nested if else statement in my custom column but it is showing the wrong data based on what i want 

here is my custom column setting

if( [Submitted the current week]="No" and [Active Workstream_AD Build]="Yes") then "Not Submitted" else if([Submitted the current week]="Yes" and [Active Workstream_AD Build]="Yes" and not List.Contains({"Team","End to End"}, [FDS Entity Type])) then if(List.Contains({"NIS", ""}, [Cost Performance Index])) then "Not Submitted" else "Submitted" else if([Submitted the current week]="Yes" and [Active Workstream_AD Build]="Yes" and [Active Workstream AD_Test]="Yes" and not List.Contains({"Team", "End to End"},[FDS Entity Type])) then if(List.Contains({"NIS",""},[Cost Performance Index])) then "Not in Scope" else "Submitted" else "Not in Scope"

 

here is the data set

yvescn1_0-1629791521066.png

I do want to output on the last column "Submitted" since [Submitted the current week]=yes

Active workstream AD_Test, Active Workstream_AD Build = yes

FDS entity type is equal to = Team

i dont understand why it was outputting "Not in Scope"

 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

each if {[Submitted the current week],[Active workstream AD_Test],[Active Workstream_AD Build],[FDS entity type]}={"Yes","Yes","Yes","Team"} then "Submitted" else "Not in Scope"

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

each if {[Submitted the current week],[Active workstream AD_Test],[Active Workstream_AD Build],[FDS entity type]}={"Yes","Yes","Yes","Team"} then "Submitted" else "Not in Scope"

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.

Top Solution Authors
Top Kudoed Authors