Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey Guys,
I am stuck with a new a problem now.
So i have a list of vehicles which has a column "active from"-From which date the vhicle is active
and "completion"-its just 6 months after the" active from" date.
Objective-When a user select a date range ,so first we have to check if any of the vehicle's completions date is falling under that date range.
IF Yes then we have to calculate the difference between last date of selection with the vehicle's completion date.Then that difference will be divided by30.
Contains = IF(CONTAINS(vehiclecount,ehiclecount[Completion Date],[selected_Date]),1,0)
Returns me if the vehicles completion date is under selection
Measure =
Var conta =[Contains]
Return
CALCULATE(DATEDIFF(MIN(vw_vehiclecount[6 Months Completion]),[selected_Date],DAY),FILTER(vw_vehiclecount,conta=1))/30
This gives me the total and divided by 30.
But i total is coming our wrong
User | Count |
---|---|
42 | |
28 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |