Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change time format in Y Axis

Hi all,

Can anyone tell me how I can change the Y axis from 'hh:mm:ss' to 'hh'?

Many thanks,

Matt

7 Replies
Anonymous
Not applicable
Author

Matt,

Assuming your Y-axes is an expression - go to the Number tab in chart properties, select timestamp, and set format Pattern to hh.

Regards,

Michael

Not applicable
Author

Hi Michael,

Thanks for responding. This works for the values on data points within the chart but not the Y axis.

Many thanks,

Matt

Not applicable
Author

Hi Michael,

Thanks for responding. This works for the values on data points within the chart but not the Y axis.

Many thanks,

Matt

Not applicable
Author

Hello,

You can use the hour() function in the dimension.

(Dimension tab > edit your dimension > hour(Field))

This way you will only show the hour on the Y-axis instead of the full timestamp.

Regards,

Lucas

Not applicable
Author

Thanks Lucas - However, my dimension is a Meket Code and my expression is the time componant.

Kind regards,

Matt

Not applicable
Author

oh sorry, I read too fast.

And can't you use the hour() function in the expression?

Else if it's an interval you should be able to use the interval() function and specify a format

interval(TimeField, 'hh')

Not applicable
Author

I have a the following in my script which converts the decimal to time:

     [Block to Allocation Hours],

        Time(([Block to Allocation Hours]/24),'hh:mm') as ConvertedTime_BtoA,

     [Allocation to Contract Hours],

        Time(([Allocation to Contract Hours]/24),'hh:mm') as ConvertedTime_AtoC,

     [Block to Contract Hours],

     [Contract To Affirmation Hours],

              Time(([Contract To Affirmation Hours]/24),'hh:mm') as ConvertedTime_CtoA,

I want to keep this the same as I want the 'hh:mm' on the chart data points

I then have 3 separate expressions in the chart:

Avg(ConvertedTime_BtoA)

Avg(ConvertedTime_AtoC)

Avg(ConvertedTime_CtoA)

I was under the impression any amendments to the expression will amend the chart content rather than the Y axis? (I am new to QV so probably wrong).

Many thanks,

Matt