Forum Discussion
yasbos
3 years agoResolver II
Context Filter Help
Hi. I thought I had completely understood how this works, but now I'm doubting myself. You see, I have a calendar table and a service table. They are related 1-to-many on the date. There are certain ...
- Anonymous3 years ago
Hi yasbos ,
It seems that you are trying to get the maximum value of the [Date] column in the service table and ignore the filtering context on this column.Please try this.
Current_Date = CALCULATE ( MAX ( service[date] ), ALL () )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
amitchandak
3 years agoSuper User
yasbos , You should use today for current month
ticketsMTD=
var vMaxDate=today()
var vMaxDate=today()
var vMTDRequests=calculate([_Total_Requests],filter(Service,month(Service[Created_Time])=month(vMaxDate) && year(Service[Created_Time])=year(vMaxDate)))
also for last available month
ticketsMTD=
var vMaxDate=maxX(allselected(service), service[date])
var vMaxDate=maxX(allselected(service), service[date])
var vMTDRequests=calculate([_Total_Requests],filter(Service,month(Service[Created_Time])=month(vMaxDate) && year(Service[Created_Time])=year(vMaxDate)))