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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

MULTIPLE IFS

Hello fellow PBI users,

 

do you know the formula below in Power bi? i got so used in Tableau finding hard to replicate this in PBI

 

IF [SHIP_DATE] < TODAY()
THEN 'Backlog'
ELSEIF [SHIP_DATE] < TODAY() + 2
THEN 'Today'
ELSEIF [SHIP_DATE] < TODAY() + 6
THEN 'N5D'
ELSE 'Future'
END

 

 

1 ACCEPTED SOLUTION
jppv20
Solution Sage
Solution Sage

Hi @Anonymous ,

 

The formula should be like this:

Column = IF([SHIP_DATE] < TODAY(),
'Backlog',
IF([SHIP_DATE] < TODAY() + 2,
'Today',
IF([SHIP_DATE] < TODAY() + 6,
'N5D',
'Future'
)))
 
Jori
 
If I answered your question, please mark it as a solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@Anonymous 

Try this as new column in your table:

Shipment Status =
SWITCH (
    TRUE (),
    [SHIP_DATE]  < TODAY () + 6, "N5D",
    [SHIP_DATE]  < TODAY () + 2, "Today",
    [SHIP_DATE]  < TODAY (), "Backlog",
    "Future"
)
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

sirlanceohlott
Advocate III
Advocate III

@jppv20 has the solution for you!

jppv20
Solution Sage
Solution Sage

Hi @Anonymous ,

 

The formula should be like this:

Column = IF([SHIP_DATE] < TODAY(),
'Backlog',
IF([SHIP_DATE] < TODAY() + 2,
'Today',
IF([SHIP_DATE] < TODAY() + 6,
'N5D',
'Future'
)))
 
Jori
 
If I answered your question, please mark it as a solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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