Forum Discussion
Last date in period issue when use DatesBetween
- 2 years ago
I suggest you write some custom time Intelligence. I talk about it here
https://exceleratorbi.com.au/dax-time-intelligence-beginners/
and here (additional features of a good calendar table)
https://exceleratorbi.com.au/power-bi-calendar-tables/
once you have a monthID column in your calendar table, use that to do your calendar time shift. All you need to do in the filter portion is filter the calendar table, you don't need all that extra datesbetween stuff.FILTER(ALL(Calendar),Calendar[MonthID] >= MIN(Calendar[MonthID])-[Parameter value] &&
Calendar[MonthID] <= MIN(Calendar[MonthID]))
with the above filter, you can then extract the dates
CALCULATE(MIN(Calendar[Date]),
FILTER(ALL(Calendar),Calendar[MonthID] >= MIN(Calendar[MonthID])-[Parameter value] &&
Calendar[MonthID] <= MIN(Calendar[MonthID]))
)
Thank you! your suggested solution is so much better!