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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pozerlars
New Member

How plot chart of number of events happening within a timeframe

We have a dataset as follows:

10/11/2021 09:01

10/11/2021 09:06

10/11/2021 09:24

10/11/2021 09:45

10/11/2021 10:31

.....

10/12/2021 09:05

10/12/2021 10:15

 

We want an area chart where the x-axis is the time (every 30 minutes starting from 00:00 of a day) and the y-axis is the count of the number of events happening every 30minutes. 

The result that we expect is 

Time frame            Count      

10/11/2021 09:00  3  (09:01, 09:06, 09:24)

10/11/2021 09:30 1  (09:45)

10/11/2021 10:00 0 

10/11/2021 10:30 1  (10:31)

...

10/12/2021 09:00 1 (09:05)

10/12/2021 09:30 0  

10/12/2021 10:00 1

....

 

Then we plot the above over time.

 

So far we have found posts which are creating a calendar and doing the counts for all times that is combining all the days and counting number of events between 09:00 and 09:30, 09:30 and 10:00, etc. But we do not want a count over all the day:

https://community.powerbi.com/t5/Desktop/Events-in-progress-per-hour-slot-aggregated-across-multiple...

https://community.powerbi.com/t5/Desktop/Grouping-data-each-15-minutes/m-p/639686

https://community.powerbi.com/t5/Desktop/Grouping-data-each-15-minutes/m-p/639686

 

1 REPLY 1
mahoneypat
Employee
Employee

Please see this video. It will show you how to split your datetime values to date and time (best practice), create date and time dimension table, create a column to round all the times to the nearest 30 min, so you can use that column in your visual to easily get the counts. Times with no counts would return null and be automatically hidden/filtered in the visual.

It's About Time - Part One - YouTube

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.