Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
@alanphamvistra4, Create a calculated column in your table using DAX,
Status = SWITCH(
TRUE(),
'Date'[Expected Expiration Date] < TODAY(),
"Expired",
DATEADD('Date'[Expected Expiration Date],-30,DAY) < TODAY(),
"Expiring",
"Active"
)
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")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |