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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
amhiggins
Frequent Visitor

Manually Define Axis Limits for Time

Hello! 

 

Is there a way to set the Start and End values of an axis to time values?

 

Below I am showing a count of items that occur during each hour of a day and I'd like the axes to line up each hour regardless of if there is data in that hour.  I've included a screen shot below showing a Monday and a Tuesday - I'd like for both axes to go from 8AM to 7PM despite not all hours showing up each day. I tried turning on "Show items with no data" but that doesn't work I think because I'm doing a count so that hour just doesn't exist for a particular day in the data as opposed to it just not having any data.

amhiggins_0-1620241435891.png

 

It looks like for the manual settings it only allows an integer or a datetime value, but not a time value alone? Is there any way around this?

amhiggins_1-1620241772098.png

 

EDIT: I ended up extracting the hour from the datetime column and using that on the x-axis like the solution to the post linked in the marked solution below https://community.powerbi.com/t5/Desktop/Date-and-Time-X-axis/m-p/724266). I also multiplied the hour by 100 to make it look more like a 24 hour clock time (800 => 08:00, 8:00AM, 2000 => 20:00, 8:00PM). Then I was able to set the axis limits to the integer values. 

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @amhiggins ,

Based on my research, we’re able to set both date and hour in the X-axis, but the minimum interval is 3 hours. 

v-luwang-msft_0-1620615281902.png

Please share your idea here if you’d like to bring the 1 hour-interval feature coming:

https://ideas.powerbi.com/ideas/ 

And you also could  create the chart with hours in axis,the following article is a little similar  to your question,you could have a look:

Date and Time X-axis:https://community.powerbi.com/t5/Desktop/Date-and-Time-X-axis/m-p/724266

Wish it is helpful for you!

 

Best Regards

Lucien

 

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @amhiggins ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
 
Best Regards
Lucien
v-luwang-msft
Community Support
Community Support

Hi @amhiggins ,

Based on my research, we’re able to set both date and hour in the X-axis, but the minimum interval is 3 hours. 

v-luwang-msft_0-1620615281902.png

Please share your idea here if you’d like to bring the 1 hour-interval feature coming:

https://ideas.powerbi.com/ideas/ 

And you also could  create the chart with hours in axis,the following article is a little similar  to your question,you could have a look:

Date and Time X-axis:https://community.powerbi.com/t5/Desktop/Date-and-Time-X-axis/m-p/724266

Wish it is helpful for you!

 

Best Regards

Lucien

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.