Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change order of axis scale

Hi,

I have <24h Hour> as a dimension which shows me Hours in the following order:

00:00     01:00     02:00 .... 23:00

Is it possible to change the starting point and be able to show <24h Hour> in this order:

06:00     07:00     08:00 .... 23:00     00:00     ... 05:00

Any idea please?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi, in this case, you need to create 3 news fields (HOUR_ID, 15MIN_ID and 30MIN_ID) using the function MAPPING how used to create the field HOUR_ID.

When you use GROUP (cyclic or drill down), can be edited in "Document Properties" / "Groups" / Edit your group / Click the button "Sort Orders".

View solution in original post

7 Replies
Not applicable
Author

You can use the function MAPPING for order your object.

Example:

In your script create a temporary table

TEMP_ID:

MAPPING LOAD * INLINE [

    HOUR, ID

    00:00, 19

    01:00, 20

    02:00, 21

    03:00, 22

    04:00, 23

    05:00, 24

    06:00, 1

    07:00, 2

    08:00, 3

    09:00, 4

    10:00, 5

    11:00, 6

    12:00, 7

    13:00, 8

    14:00, 9

    15:00, 10

    16:00, 11

    17:00, 12

    18:00, 13

    19:00, 14

    20:00, 15

    21:00, 16

    22:00, 17

    23:00, 18

];

In your table where exists the field [24h Hour] you need to use the APPLYMAP:

LOAD...

[24h Hour] AS HOUR_FIELD,  // here show the hour ex: 03:00

APPLYMAP('TEMP_ID', [24h Hour]) AS HOUR_ID   // here show the ID ex: 22

...

In your Object/Graph chenge the classification to "Expression" and insert the field HOUR_ID.

Not applicable
Author

Hi Eduardo,

Thanks for your help.

I created Hour_ID but I don't know how to use it.

What do you mean by 'change classification to "Expression ' ?

where do I do it? within dimension tab?

nagaiank
Specialist III
Specialist III

Use HOUR_FIELD as dimension.

In the Sort tab of the Properties window of the chart/object, for HOUR_FIELD, check Expression in the Sort By box.

Not applicable
Author

Hi, in properties of your chart, selected tab "SORT" and put in your dimension HOUR_FIELD.

Sort.png

Not applicable
Author

Does it work when dimension is in a cyclic group?

My Dimension which is Time_Intervals consists of 3 dimensions (15min intervals, 30min and 1h).

I am asking because as you can see on the attached picture that the "Expression" option is not active.

Not applicable
Author

Hi, in this case, you need to create 3 news fields (HOUR_ID, 15MIN_ID and 30MIN_ID) using the function MAPPING how used to create the field HOUR_ID.

When you use GROUP (cyclic or drill down), can be edited in "Document Properties" / "Groups" / Edit your group / Click the button "Sort Orders".

Not applicable
Author

HI Eduardo,

Thank you for your help. It works perfectly, however, I twisted your answer a little bit.

I have 15min intervals with unique IDs. £0min and 1h intervals are subsets of 15min interval. Hence they have IDs already. What I had to do sort 15min intervals by ID, sort 30min interval by sum(Id) and 1h interval by sum(Id) as well.

D.