Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have parking lot occupancy data and the data is captured multiple times a day. I want to see the most recent data. I created a column, "LastSampleDate" To show the most recent date/time a sample was captured. However, I can't figure out how to show the #Occupied Spaces. Example: the "Brooke" location had occupied spaces samples throughout the day but at the last sampling, 8:42:25PM, there were only 140 spaces occupied but the data is summing everything for the whole day
Solved! Go to Solution.
Hi,
In the visualisation pane, click on the roller brush icon and under Totals, turn off the Totals. Now drag the measure in the visual.
Hope this helps.
Hi,
You do not need a Lastsampledate column in your dataset. Try these measures
Last Sample Date = MAX(Data[DSample])
Occupied spaces on last sample date = LOOKUPVALUE(Data[OccupiedSpaces],Data[DSample],[Last Sample Date],Data[Location],Data[Location])
Hope this helps.
@Ashish_Mathur the only issue is it won't work for each location, the measure only seems to work if I type in a location. There are 4 locations total, I was just using "Brooke" as an example. This is what works but how do I make it work for all locations?
LastOccupiedSpaces = LOOKUPVALUE(ParkingLotSample[OccupiedSpaces], ParkingLotSample[DSample], [LastSampleD], ParkingLot[Location], "Brooke")
Why are you hard coding Brooke in the DAX formula. I have not done that in mine. Try this
=LastOccupiedSpaces = LOOKUPVALUE(ParkingLotSample[OccupiedSpaces], ParkingLotSample[DSample], [LastSampleD], ParkingLot[Location],ParkingLot[Location])
Hi,
Try this
=LastOccupiedSpaces = LOOKUPVALUE(ParkingLotSample[OccupiedSpaces], ParkingLotSample[DSample], [LastSampleD], ParkingLot[Location],VALUES(ParkingLot[Location]))
It didn't like that either It returned
"Couldnl't Load the data for this visual
MdxScript(Model) (7,156) Calculation error in measure 'ParkingLotSample'[LastOccupiedSpaced]: A table of multiple values was supplied where a single value was expected"
Hi,
Share the link from where i can download the file.
Hi,
I received absolutely no error. I just ticked the box for LastOccupiedSpaces.
Ugh it still won't work for me! I don't know why. Thanks for all of your help!
Hi,
In the visualisation pane, click on the roller brush icon and under Totals, turn off the Totals. Now drag the measure in the visual.
Hope this helps.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
42 | |
31 | |
27 | |
27 |