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.
where A5 is Expected Expiration Date and Date is = TODAY()
What would be a similar DAX equation?
@alanphamvistra4, Create a calculated column in your table using DAX,
Status = SWITCH(
'Date'[Expected Expiration Date] < TODAY(),
DATEADD('Date'[Expected Expiration Date],-30,DAY) < TODAY(),
Hope this helps!
Hi, Try this.
Column Calculated = IF(DATEVALUE([COLUMN WITH A5])<TODAY(),"EXPIRED",IF(DATEADD([COLUMN WITH A5],-30,DAY)<TODAY(),"EXPIRING","ACTIVE")
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.