Forum Discussion
SachinC
7 years agoHelper V
Date Filtering using dates until today's date
Hi, I have a PowerBI visual that uses relative date filtering, i.e. In This Month which covers 01/06/2019 to 30/06/2019. However, what I need is this month upto the date it is viewed. Example, if t...
v-diye-msft
7 years agoCommunity Support
Hi SachinC
I’ve created a sample with the date from May 20 to June 24 as below, we can achieve the result filtered by the dates in the same month till today using the measure :
Measure = var today = TODAY()
var tm = MONTH(TODAY())
var ty = YEAR(TODAY())
Return
IF(MAX([Date])<=today&&MONTH(MAX([Date]))=tm&&YEAR(MAX([Date])=ty),1,0)
And then filter the measure by “1”:
Regards,
Dina