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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aliasghar
Regular Visitor

Parking utilisation

Hi all,

 

So I am a newbie to DAX and I would like to find out the number of cars that are inside the parking lot at an hourly rate based on user-type(daily & season). The sample data is below:

 

  Capture.JPG

 

 Your help wiil be highly appreciated.

4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @aliasghar,

 

COUNT and COUNTROWS functions may help you.

 

In addition, here is a similar thread you could have a reference.

 

If you still need help, please share your data sample as table and your expected output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft,

 

Thanks for the respond, However, the COUNTIF function doesn't give me the expected output. Basically what I'm trying to achieve is to find out the number of people utilizing the parking space based on user type (daily & season) at an hourly rate.  The sample data as below:

 

UserIdDateTimeTerminalExit/EntryChargesUser_Type
FD0224506/3/201808:28:000DEntry3.71Daily
FD0224506/3/201815:41:000CExit3.71Daily
FD0224507/3/2018 08:39:310DEntry3.71Daily
FD0224507/3/2018 12:30:420CExit4.77Daily
FD0224508/3/2018 08:57:310DEntry2.65Daily
FD0224508/3/2018 10:35:000CExit2.65Daily
FD0224508/3/2018 10:57:270DEntry2.12Daily
FD0224508/3/2018 17:00:170CExit2.12Daily
FD0307158/3/2018 07:57:070DEntry3.71Daily
FD0307158/3/2018 10:27:390CExit3.71Daily
FD03484825/3/2018 11:23:370DEntry2.65Daily
FD03484825/3/2018 12:54:440CExit2.65Daily
FD0318813/3/2018 12:50:050DEntrySeasonSeason
FD0318813/3/201814:20:000CExitSeasonSeason
FD03469027/3/2018 11:36:030DEntrySeasonSeason
FD03469027/3/2018 15:30:220CExitSeasonSeason
FD03513313/3/2018 08:39:080DEntrySeasonSeason
FD03513313/3/2018 11:47:030CExitSeasonSeason
FD03675113/3/2018 08:42:190DEntrySeasonSeason
FD03675113/3/2018 14:11:050CExitSeasonSeason
FD03675114/3/2018 10:33:300DEntrySeasonSeason
FD03675114/3/2018 12:33:410CExitSeasonSeason
FD03675115/3/2018 12:45:050DEntrySeasonSeason
FD03675115/3/2018 17:20:330CExitSeasonSeason
FD03675116/3/2018 10:38:130DEntrySeasonSeason
FD03675116/3/2018 12:38:590CExitSeasonSeason
FD03675119/3/2018 13:22:210DEntrySeasonSeason
FD03675119/3/2018 17:58:560CExitSeasonSeason
FD03811214/3/2018 15:20:580DEntrySeasonSeason
FD03811214/3/2018 18:02:080CExitSeasonSeason
FD03811216/3/2018 10:18:510DEntrySeasonSeason
FD03811216/3/2018 12:49:520CExitSeasonSeason
FD03811216/3/2018 14:07:430DEntrySeasonSeason
FD03811216/3/2018 17:00:400CExitSeasonSeason
FD03811219/3/2018 13:39:110DEntrySeasonSeason
FD03811219/3/2018 20:36:580CExitSeasonSeason

 

Desired output:

 

For everydayNo. DailyNo. SeasonTotal
9 AM14923
11 AM13821
12 PM231235
1 PM111223
2 PM101222
3 PM5813
4 PM8917
5 PM9413

 

Or the desired output could also be in a form of a chart.

 

Best Regards,

Aliasghar.

Hi @aliasghar,

 

Thanks for your data sample and your desired output.

 

However, I'm not clear about the logic of your expected output, could you describe it in more details?

 

Do you have another time table? For your expected output, it seems that we need to create a calculated table.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft

 

Thanks for the response. Basically for the desired output what I want to achieve is 2 things:

1) No of cars entering the parking. (it's solved, where I used the count function)

2) Based on the entry and exits of the cars from the parking lot(as seen from the sample data). I am trying to find out how many cars are utilizing the parking space at an hourly rate by day.

 

As for the timetable, I don't have one.

 

Regards,

Aliasghar

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.