Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
clteh9
Helper I
Helper I

keep track of inventory hourly

Hi, 

 

I would like to keep track the number of cars in a car park hourly. May i know how can it be done? Thanks

 

Data:

carin timeout time
car12022-11-22 08:10:002022-11-22 08:40:00
car22022-11-22 08:20:002022-11-22 09:30:00
car32022-11-22 09:10:002022-11-22 10:30:00
car42022-11-22 10:10:002022-11-22 11:30:00
car52022-11-22 11:00:002022-11-22 13:00:00
car12022-11-22 10:40:002022-11-22 13:40:00
car22022-11-22 11:30:002022-11-22 12:30:00
   

 

Expected Report:

 2022-11-22 08:00-09:00hr2022-11-22 09:00-10:00hr2022-11-22 10:00-11:00hr2022-11-22 11:00-12:00hr2022-11-22 12:00-13:00hr2022-11-22 13:00-14:00hr
number of cars in the carpark011320
2 REPLIES 2
amitchandak
Super User
Super User

@clteh9 , Using List.DateTime, you should be able generate an hourly table

 

List.DateTimes- https://youtu.be/3UBxsIvlcRQ

 

Then you can follow same approch as HR or between filter

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

 

Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM

Hi, 

 

the solution is working fine with the above dataset. 

currently 1 entry will be created for each in/out to/from the car park. Is there any way i can count it with the following dataset? Thanks in advance for the help. 

 

original dataset:

carin timeout time
car12022-11-22 08:10:00 
car1 2022-11-22 08:40:00
car22022-11-22 08:20:00 
car2 2022-11-22 09:30:00
car32022-11-22 09:10:00 
car3 2022-11-22 10:30:00
car42022-11-22 10:10:00 
car4 2022-11-22 11:30:00
car52022-11-22 11:00:00 
car5 2022-11-22 13:00:00
car12022-11-22 10:40:00 
car1 2022-11-22 13:40:00
car22022-11-22 11:30:00 
car2 2022-11-22 12:30:00
car32022-11-22 12:30:00 

 

after find the matching paired: 

carin timeout timenew column (find the matching in-time pair)
car12022-11-22 08:10:00  
car1 2022-11-22 08:40:002022-11-22 08:10:00
car22022-11-22 08:20:00  
car2 2022-11-22 09:30:002022-11-22 08:20:00
car32022-11-22 09:10:00  
car3 2022-11-22 10:30:002022-11-22 09:10:00
car42022-11-22 10:10:00  
car4 2022-11-22 11:30:002022-11-22 10:10:00
car52022-11-22 11:00:00  
car5 2022-11-22 13:00:002022-11-22 11:00:00
car12022-11-22 10:40:00  
car1 2022-11-22 13:40:002022-11-22 10:40:00
car22022-11-22 11:30:00  
car2 2022-11-22 12:30:002022-11-22 11:30:00
car32022-11-22 12:30:00  

 

expected result:

 2022-11-22 08:00-09:00hr2022-11-22 09:00-10:00hr2022-11-22 10:00-11:00hr2022-11-22 11:00-12:00hr2022-11-22 12:00-12:59hr2022-11-22 13:00-14:00hr
number of cars in the carpark112331

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.