Forum Discussion
JMS1985
5 years agoFrequent Visitor
Calculate future values
Hello, I have a table with vehicles (each line is an individual vehicle) and each vehicle has a date that indicates the moment the vehicle is being sold and wont be in my fleet anymore. Pl...
amitchandak
5 years agoSuper User
JMS1985 , assuming you have independent date table for selection of date
Measure =
VAR _min = Minx(allselected('Calendar'), 'Calendar'[Date]))
return
calculate(count(Table[Plate number]), filter(Table, Table[Date - Sold] >=_min))
- JMS19855 years agoFrequent Visitor
Hello amitchandak , thank you for your fast reply.
I´m having problems with the formula as it won´t accept "return"
"Función invocada" is a date table
"Defleet" is the column name of the date the vehicle is being sold and leaving.
FLEET =VAR_min = MINX(ALLSELECTED('Función invocada'), 'Función invocada'[Fecha])returnCALCULATE(COUNT(VEHICLE_VIEW[CHASSIS_NUMBER]), FILTER(VEHICLE_VIEW, VEHICLE_VIEW[DEFLEET]>=_MIN))The "Return" sintaxis is not correct