Forum Discussion

amhiggins's avatar
amhiggins
Frequent Visitor
5 years ago
Solved

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.

 

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?

 

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. 

 

2 Replies