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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Filtering the line graph visual based on time

Hi,

I'm trying to make a line graph on powerbi, that represents the number of sales happening over time of the day. But i want to represent only the peak hour sales. The table looks something like shown below (just a sample)

 

EashwarBalaji_4-1707733602516.png

 

In PowerBI, I've used a line graoh visual with time on the x-axis, and count of Sales ID on y-axis.
I have used a 10 mins bins for the time. I have also kept the Peak hour filter on the powerBI visual.
Now the graph looks soemthing like this:

 

EashwarBalaji_3-1707733422395.png

 

But i want the x-axis to only display the peak hours. i.e., i want to see the tickets sales only between 7AM-10AM and then 4PM-8PM and nothing in between. Is that possible?

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I have used the bins in PowerBI and drill down options to make the graph more insightful. For now, this is good.
Thanks everyone for your help.

To do this:
Right click on the time field in the Data Section, and click "New Group"

EashwarBalaji_3-1708350605429.png

 

You could set the size of groups/bins you want to have on the visual (I've used 15 mins)

EashwarBalaji_2-1708350576735.png

Now, by adding both bins and the time (in that order) in the visual along with the "Peak" filter. I'll be able to drill down on the visual.

EashwarBalaji_4-1708350809683.png


Drill down basically just shows the individual sales made within the 15 min bin (when I click on a data point on the above graph).

EashwarBalaji_5-1708350897475.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I have used the bins in PowerBI and drill down options to make the graph more insightful. For now, this is good.
Thanks everyone for your help.

To do this:
Right click on the time field in the Data Section, and click "New Group"

EashwarBalaji_3-1708350605429.png

 

You could set the size of groups/bins you want to have on the visual (I've used 15 mins)

EashwarBalaji_2-1708350576735.png

Now, by adding both bins and the time (in that order) in the visual along with the "Peak" filter. I'll be able to drill down on the visual.

EashwarBalaji_4-1708350809683.png


Drill down basically just shows the individual sales made within the 15 min bin (when I click on a data point on the above graph).

EashwarBalaji_5-1708350897475.png

 

Anonymous
Not applicable

Hi @Anonymous 

 

@amitchandak  Thank you very much for sharing!

 

For your question about the visual wanting to show sales only during peak hours, you can try to resolve this by filtering on peak hours.

 

I noticed in your screenshot there is a column that shows if that time period is a peak period, please try the following:

 

Filtered Vision:

 

Choose your line chart visual.

 

Drag the Peak Hours column to the Filters pane.

 

Set the filter to only show "peak" times.

 

vnuocmsft_0-1708309631040.png

 

If you still have problems, it is best to provide the pbix file and be careful to delete sensitive data.

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Hi,

Thanks for your reply. I've tried the filter, but it still shows the time in between the two peak hours on x-axis, without any sales on y-axis.

EashwarBalaji_0-1708350064144.png

 

amitchandak
Super User
Super User

@Anonymous , You can create an hour column and you can use that in the slicer

 

Hour = hour(Table[Time])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

That'll still show the 10AM-4PM on x-axis with 0 sales right

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors