Slices

I'm trying to create a slice which will count the number of items in another table where the following conditions apply:

Primary table: VRN Table

Fields: VRN

Contains 12 Vehicles

Secondary Table: Vehicle Checks

Fields: VRN & Datetime

Only 8 Vehicles have had a check done.

I want the slice to show any vehicle from the VRN Table that has not had a Vehicle Check, so it will show 4 vehicles.

I was thinking of something like this:

COUNT(Filter("Vehicle Check Data",[Timestamp]=Today()))=0

but I don't know where to put the VRN for comparison and the current expressions is not working anyway.

Solved Solved
0 3 61
1 ACCEPTED SOLUTION

It's ok, I found another solution.  I added a Day and Night count in the VRN Data. So it would cross reference it against the checks being done for that day:

COUNT(select(Vehicle Check Data[Unique ID], AND([Vehicle Registration Number:]=[_ThisRow].[VRN],[Timestamp]>=Today(),Time([Timestamp])>="06:00:00",Time([Timestamp])<="11:00:00")))

View solution in original post

3 REPLIES 3

I think you may want to elaborate. Do the same set of 12 vehicles from the table VRN come up daily for check? Is the check on daily basis repeated for those 12 vehicles and does the "Vehicle Checks" table have accumulated checklist records for those 12 vehicles ? Or does the table delete the previous days' checklist and starts with a clean slate on a daily basis.

Finally is it correct understanding that you would like to have the slice on VRN table to list the remaining vehicles based on checks done in the "Vehicle Checks"

It's ok, I found another solution.  I added a Day and Night count in the VRN Data. So it would cross reference it against the checks being done for that day:

COUNT(select(Vehicle Check Data[Unique ID], AND([Vehicle Registration Number:]=[_ThisRow].[VRN],[Timestamp]>=Today(),Time([Timestamp])>="06:00:00",Time([Timestamp])<="11:00:00")))

Great, nice to know you got it working.  Thank you for the update. 

Top Labels in this Space