Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
saxofonoacn
Partner - Contributor III
Partner - Contributor III

Sorting in bar chart issue

Hi all,

I am facing an issue with sorting data in a bar chart. Seemed easy enough but it's proving to a tricky one.

I am using an expression to sort the data (num(Event_Dt) & num(Interval_Time) ) which  gives me an unique timestamp of a date and a 15 min interval (say 22/02/201607:45 in number format). The dimension is Interval_Time and the Expression is a simple sum of ItemIDs. There's one challenge: a day is split up into three shifts - the last one is over 2 days (from 10pm to 6am the following day).

I tried moving this sorting expression into the load but I'm having no luck... created a new field that would create a sequence number which I could use on sorting and which would solve the last shift overlap of two days, i.e. the sequence would go from 99 as the last possible for today and 100 as first tomorrow. I also tried autonumber() or creating a min() and max() of times and then autogenerating a sequence number... nothing works.

Any suggestions??

Thanks a lot!

5 Replies
settu_periasamy
Master III
Master III

Hi,

Can you post sample qvw?

saxofonoacn
Partner - Contributor III
Partner - Contributor III
Author

Hi, unfortunately I cannot. I can't recreate this as the app is complex, and the data is sensitive to share. I was wondering whether anyone had similar experience and what was the workaround?

luciancotea
Specialist
Specialist

In Bar chart, try to sort by expression: =max(num(Event_Dt) + num(Interval_Time))

luciancotea
Specialist
Specialist

Well, the first steps in technical support is to isolate and recreate the problem. The data can be scrambled using the "Scramble" feature in Document Settings.

We don't know what your data looks like, your data model or your chart.

HirisH_V7
Master
Master

Hi,

Can you post your Sample Data or App.

You can Try like this while loading the Fields,

Order By  TimeStampField Asec

Hope this helps,

Hirish

HirisH
“Aspire to Inspire before we Expire!”