Forum Discussion
Changing the context filter based inside a calculation
Mr_Robot0092 , First of all you need a date wise status for that. Now you can have column on meausre for what you need
Like the last status column
=
var _max = maxx(filter(Table, [NB Client] = earlier([NB Client]) && [Date] < Earlier([Date]) ) , [Date])
return
maxx(filter(Table, [NB Client] = earlier([NB Client]) && [Date] =_max ) , [Status])
for measure refer
Power BI Abstract Thesis: How to use two Date/Period slicers
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9
Hello amitchandak
Thanks for replying .I tried to do your code but doesn't work i this [NB Client] = earlier([NB Client]) i have this error the parameter is not not the correct type .
The [NB Client] is measure with Distinctcount(client_id)
Any idea ?