cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Convert Excel Equations into Equivalent DAX Equation to Add Calculated Column to Loaded Data

I am trying to convert an equation I used in excel into a DAX equation to create a calculated column to add to data table that is already loaded into Excel.

Excel Equation:

Status=IF(DATEVALUE(A5)<\$D\$1,"Expired",IF(DATEVALUE(A5)-30<\$D\$1,"Expiring","Active"))

where A5 is Expected Expiration Date and Date is = TODAY()

What would be a similar DAX equation?

2 REPLIES 2
Resident Rockstar

@alanphamvistra4, Create a calculated column in your table using DAX,

``````Status = SWITCH(
TRUE(),
'Date'[Expected Expiration Date] < TODAY(),
"Expired",
"Expiring",
"Active"
)``````

Hope this helps!

Anonymous
Not applicable

Hi, Try this.

Column Calculated = IF(DATEVALUE([COLUMN WITH A5])<TODAY(),"EXPIRED",IF(DATEADD([COLUMN WITH A5],-30,DAY)<TODAY(),"EXPIRING","ACTIVE")

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors