Forum Discussion
FILTER by previous available date
- 5 years ago
Solved with the following measure, proposed by Anonymous in another topic
Previous Value =VAR CurrentDate = MAX(cleaned_row_count[Date])VAR ClientID = MAX('table'[id])VAR PreviousDate = CALCULATE(MAX(cleaned_row_count[Date]),ALL('Date'[Date]),ALL(cleaned_row_count[Date]),FILTER('Date',[Date]<CurrentDate))VAR Result = CALCULATE(SUM(cleaned_row_count[Number of Rows]),ALL('Date'[Date]),ALL(cleaned_row_count[Date]),FILTER('Date',[Date]=PreviousDate))RETURN Result
Delphia , With help from date table
max date
Measure =
var _max = maxx(allselected('Date'), Date[Date])
return
CALCULATE([sales],filter('Date', 'Date'[Date] =_max))
Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9
Thank you so much for your answer.
It doesn't work for me. Let me precise a little bit my question. My scheme looks like:
Above in my question I replaced "Number of Rows" by "Sale", sorry.
I created a measure using your patern and get the following:
Nevertheless, my table shows empty values for Last Day Non Continuous.