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

multiple if statemenrt

i have a column DOD wich is true/false/null and a column DATE which is filled or blank

i have the following statements

FORMULA                                                            DOD column       DATE column               RESULT COLUMN
IF DOD IS TRUE AND DATE IS FILLED = 1           TRUE                    1/1/2019                                  1
IF DOD IS TRUE AND DATE IS BLANK = 2           TRUE                    BLANK                                     2
IF DOD IS FALSE AND DATE IS FILLED =3           FALSE                   1/1/2019                                 3
IF DOD IS FALSE AND DATE IS BLANK =4           FALSE                  BLANK                                     4
IF DOD IS BLANK AND DATE IS BLANK = 5         BLANK                 BLANK                                    5

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

Hi, @Framboosje1 


You can create a column useing SWITCH in side a SWITCH, first you read DOD then check where DATE is bland. This formula should be clear.

Result =
SWITCH (
    [DOD],
    TRUE (), SWITCH ( [DATE], BLANK (), 2, 1 ),
    FALSE (), SWITCH ( [DATE], BLANK (), 4, 3 ),
    BLANK (), 5

 

Best, 
Paul

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

Hi, @Framboosje1 


You can create a column useing SWITCH in side a SWITCH, first you read DOD then check where DATE is bland. This formula should be clear.

Result =
SWITCH (
    [DOD],
    TRUE (), SWITCH ( [DATE], BLANK (), 2, 1 ),
    FALSE (), SWITCH ( [DATE], BLANK (), 4, 3 ),
    BLANK (), 5

 

Best, 
Paul

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.