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,
I need help with a measure that gives me the value of the last date in the two previous months.
As today is 24/11/2021 I need one measure that gives me 29/10/2021 and one that gives med 28/09/2021... The last date vary from month to month, but I always need the last previous and last two months ago
@Anonymous , with help from a date table
measure =
var _max = eomonth(today() ,-1)
var _min = eomonth(today(),-3)+1
return
calculate(lastnonblankvalue('Date'[Date], [Measure]), filter(all('Date'), 'Date'[Date]>= _min && 'Date'[Date]<= _max && 'Date'[Month year] = max('Date'[Month Year])))
Hi,
Thanks you for your reply.
I might have been a bit unclear, but I need two measures, one for last date in previous and one for last date two months back. Which one have you written?
And I can't use [Measure]...that would be a circular reference
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |