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

Chart Dimension Offset

Hey All.


I am creating a Bar Chart based on hours in a day.

I have the data hourly, but the problem is that our business day's start at 4 am (no this cannot be changed)

And the chart will automatically sort from 01:00:00 to 02:00:00 and so on.

We would like to see the chart start at 04:00:00 move from there.
How can i achieve this offset?

If i go to the sort tab in the properties i cannot seem to fix this.

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

You can either use Wildmatch in the sort by Expression options:

WildMatch(Time,04:00:00,05:00:00...)

or use Dual in the load sscript

Data:

mapping load * Inline

[ Time,Value

04:00:00,1

05:00:00,2 ]...

ans so on...


Sort:

load

Employe,

dual(Time,ApplyMap('Data',Time)) as Rate

FROM

View solution in original post

8 Replies
robert_mika
Master III
Master III

You can either use Wildmatch in the sort by Expression options:

WildMatch(Time,04:00:00,05:00:00...)

or use Dual in the load sscript

Data:

mapping load * Inline

[ Time,Value

04:00:00,1

05:00:00,2 ]...

ans so on...


Sort:

load

Employe,

dual(Time,ApplyMap('Data',Time)) as Rate

FROM

Gysbert_Wassenaar

Try sorting by an expression. Something like mod(only({1}Time)*24-4,24). See attached example.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi mike

Please try with mod(only({1}Time)*24-4,24) it should work.

thanks

Not applicable
Author

Unfortunately mod(only({1}Time)*24-4,24) wont work, it errors on 'Time' (red underline)

Wildmatch wont work either.
I guess i can try the script.

Was hoping that wasn't needed.

Gysbert_Wassenaar

Replace Time with the name of the dimension that contains your hour values.


talk is cheap, supply exceeds demand
Not applicable
Author

Lol, i should have known that.

however, the sorting gets messed up if i do this, see picture.Grafiek.JPG

robert_mika
Master III
Master III

Could you post your file?

Are you sorting by both of your expression?

Not applicable
Author

Unfortunately i cannot considering it is based on a different server without direct access.

i will try everyone's suggestions again after my reload.

Thanks in advance!