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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

IF with Multiple Condition

Hi Good day,

Can anyone pls need assistance on how can i get the result i need.

 - The Period should equal to Q1

 - The Location is under EAST and SOUTH only

 - For SOUTH Location, the Priority should contain 1 only.

 

AllanBerces_0-1741168777315.png

DESIRED OUTPUT

AllanBerces_1-1741168858098.png

Thank you

2 ACCEPTED SOLUTIONS
rajulshah
Resident Rockstar
Resident Rockstar

Hello @AllanBerces ,

 

Please try following DAX formula in calculated column and please let me know if you face any issues.

RESULT =
IF (
    [Period] = "Q1",
    IF (
        [Location] = "EAST"
            || (
                [Location] = "SOUTH"
                    && SEARCH ( "1", [Priority], 1, BLANK () ) = 1
            ),
        [Project/Mntc],
        "EXCLUDED"
    ),
    "EXCLUDED"
)

View solution in original post

bhanu_gautam
Super User
Super User

@AllanBerces Create a new column to determine if the row meets the conditions

 

DAX
Result =
IF (
    'Table'[Period] = "Q1" &&
    (
        'Table'[Location] = "EAST" ||
        (
            'Table'[Location] = "SOUTH" &&
            LEFT('Table'[Priority], 1) = "1"
        )
    ),
    'Table'[Project/Mntc],
    "Excluded"
)



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@AllanBerces Create a new column to determine if the row meets the conditions

 

DAX
Result =
IF (
    'Table'[Period] = "Q1" &&
    (
        'Table'[Location] = "EAST" ||
        (
            'Table'[Location] = "SOUTH" &&
            LEFT('Table'[Priority], 1) = "1"
        )
    ),
    'Table'[Project/Mntc],
    "Excluded"
)



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






rajulshah
Resident Rockstar
Resident Rockstar

Hello @AllanBerces ,

 

Please try following DAX formula in calculated column and please let me know if you face any issues.

RESULT =
IF (
    [Period] = "Q1",
    IF (
        [Location] = "EAST"
            || (
                [Location] = "SOUTH"
                    && SEARCH ( "1", [Priority], 1, BLANK () ) = 1
            ),
        [Project/Mntc],
        "EXCLUDED"
    ),
    "EXCLUDED"
)

Hi @bhanu_gautam @rajulshah Thank you very much for the help. Working perfectly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.