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 guessing the day 29-29=0, then can't create a date with the day is 0.
if changed to 2020-09-30, then it works.
what's the expected output that you want?
Proud to be a Super User!
maybe you can try this
Last_30_Days =
VAR MaxDate = "2020-09-29"
Return FORMAT((MaxDate-29),"yyyy-mm-dd")
Proud to be a Super User!
@ryan_mayu, Already tried and implemented in same way Thanks!! , My only point to bring this up is what's wrong with Date function to calculate Date on mentioned DAX.
As what I mentioned, you can't transfer value 0 to day parameter in the date function. please check the official doc.
https://docs.microsoft.com/en-us/dax/date-function-dax
Proud to be a Super User!
@Mohd_Naim , I checked out. it only do not support 0. I able to subtract 31
@Mohd_Naim , I logged an issue.
@Mohd_Naim , Hey, I obsereved it is not working beacause your day which is 29 and the number you are substracting are same.
For your refernce I increased a day here and it is working. Check the below screenshot which you are using is not working as they are same.
By this we can understand that we have substract either higher number are lesser number than our day.
If you think this is helpful Accept the Solution and leave a like.
Regards,
Manikumar
Proud to be a Super User!
@Mohd_Naim , Try like
Last_30_Days =
VAR MaxDate = date(2020,09,29)
Return Date(YEAR(MaxDate),MONTH(MaxDate),DAY(MaxDate)-29)
Use date function to create date
Hi,
This is the actual DAX which is failing for 29 date, Can you please check by running DAX by changing dates,
Last_30_Days =
VAR MaxDate = MAX(Dimdate[Date])
Return Date(YEAR(MaxDate),MONTH(MaxDate),DAY(MaxDate)-29)
Thanks,
Getting same error even with your solution.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |