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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
thetenz
Frequent Visitor

Multiple if functions

Hello alll, 

 I am trying to create a slicer that filters reports by  90 days, past due, due soon. How do I write the conditions below in Dax

 

if due date is over 90 days ="past due"
If due date is between 45 to 90 days = "Due soon"
If due day i equal to 90 days then = "90 days"

 

Than you

 

2 REPLIES 2
lbendlin
Super User
Super User

SWITCH(TRUE(),

[Due Date]>90,"past due",

[Due Date]=90,"90 days",

[Due Date]>44,"due soon",

"not due soon")

VishalJhaveri
Resolver III
Resolver III

If(
     Due Date > 90,
    "Past due",
    If(Due Date = 90,
       "90 days",
        If(Due Date = 45 && Due Date < 90,
          "Due soon",
        )
    )
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors