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 created a measure called _dateInc that brings me the date when the last product was lost.
I would like to know how many days the stock has been without losing new products, and with that, I would like to subtract TODAY() with the day of the last loss (_dateInc). I tried to use:
measure = TODAY () - [_dateInc]
but I received a strange date, with the year set in 1900. I just want to know the number of days.
Solved! Go to Solution.
@Anonymous Please try
measure = DATEDIFF([_dateInc],TODAY(),DAY)
https://docs.microsoft.com/en-us/dax/datediff-function-dax
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
@Anonymous , You can subtract and add Days date without any function. If you subtract a date from date, it will return diff in term of timestamp
Use date diff if these are two dates
datediff(TODAY () , [_dateInc],DAY)
@Anonymous Please try
measure = DATEDIFF([_dateInc],TODAY(),DAY)
https://docs.microsoft.com/en-us/dax/datediff-function-dax
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |