Forum Discussion
Syndicate_Admin
Administrator
3 years agoMAX date filtering
Good afternoon I have a report where I have two data tables. One of sale (Consultation A) where the date is normally today -3 days and another of other types of services (Consultation B) that is ...
amitchandak
Super User
3 years agoM1 =
var _date = maxx(allselected(Table1) , Table1[Date])
return
calculate(sum(Table1[Value]), filter(Table1, Table1[Date]= _date))
M2 =
var _date = maxx(allselected(Table2) , Table2[Date])
return
calculate(sum(Table2[Value]), filter(Table2, Table2[Date]= _date))
In case you need to remove a filter context on date
M2 =
var _date = maxx(all(Table2) , Table2[Date])
return
calculate(sum(Table2[Value]), filter(all(Table2), Table2[Date]= _date))