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.
Hi everybody, I have a problem Calculating February last day on leap year.
Suppose we are on February 15, 2017 and I need to calculate the last day of the same date one year back (February 29,2016) (It’s a Leap year).
Any idea?
Solved! Go to Solution.
I finally made this way
If it is a continuous date
the dateadd(Table[Date],-1,year)
Or
Last year same date = date(year(Table[Date])-1,month(Table[Date]),day(Table[Date]))
if you need last day of the same month, but in a previous year try
Column = ENDOFMONTH( DATE(YEAR([Date]) - 1, MONTH([Date]), DAY([Date])) )
The Problem is because the dashboard has 2 filters (Year and Month ) and In order to get the date I´m using MAX(Time(Date)) and the "ENDOFMONTH" not accept Max as a part of the formula.
Error=
@MiguelSaldana77 - EOMONTH(MAX('Cat Tiempo'[Fecha]),-12) For last year February. For this year Feb, EOMONTH(MAX('Cat Tiempo'[Fecha]),0) assuming your max date is some date in Feb.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |