Forum Discussion
REWINDER
4 years agoFrequent Visitor
Measure to filter rows based on two dates (begin and end date)
Hi everyone, I have been working on this problem for a couple of hours now and hope someone is able to help me solve this: Looking to get a measure with Active verhicles (>=Purchase date , <=Repl...
- 4 years ago
Hi,
I am not sure if I understood your data model correctly, but please try the below measure and put it together with Date[Year] column from Date Table.
#Vehicles Active = CALCULATE ( COUNTROWS ( FleetActivity ), FILTER ( ALL ( FleetActivity ), FleetActivity[PurchaseDate] <= MAX ( 'Date'[Date] ) && FleetActivity[ReplacementDate] >= MIN ( 'Date'[Date] ) ) )
REWINDER
4 years agoFrequent Visitor
Thank you Jihwan_Kim,
That works great!
Just applied it to the actual model and works too.
Jihwan_Kim > If I want to retain the column data to see the breakdown of what ClassStructure the vehicles had, how would I adapt the measure for that?
Thank you in advance