Forum Discussion
RichardBroadley
6 years agoFrequent Visitor
Need to filter data on when a row was active
There are number of date slicers/filters for Power BI that can filter on a single date column within a dataset being within a user selected date range. However, I need a slicer/filter that works the ...
Anonymous
6 years agoNot applicable
I would try adding a measure to find whether the selected date is between your valid to/from dates (something akin to the below)
Active Record on Date =
var selDate = SELECTEDVALUE('Calendar'[Date])
var isActive = if(and(selDate>=firstdate('Table'[valid from]),selDate<=firstdate('Table'[valid to])),1,0)
return isActivesome screenshots for context:
My Data:
My Fields:
My Slicer:
My Filter:
This will filter down the records when the selected date is between the to/from dates. hope that helps