Creating a visual to display the occupancy in a car park

Okay I’m on the latest version of PBI, expect it’s related to this thread.

Try again but instead of the && use a comma like below

Occupancy = 
VAR TimeSelection = SELECTEDVALUE( Data_Sample[Purchase Start Date & Time] )
RETURN

COUNTROWS( 
    CALCULATETABLE( Data_Sample,
        REMOVEFILTERS( Data_Sample[Purchase Start Date & Time] ),
        Data_Sample[Purchase Start Date & Time] <= TimeSelection,
        Data_Sample[Purchase End Date & Time] >= TimeSelection
    )
)