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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors
Top Kudoed Authors