Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Partner
Partner

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

Re: Sorting in bar chart issue

Hi,

Can you post sample qvw?

Partner
Partner

Re: Sorting in bar chart issue

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
Valued Contributor

Re: Sorting in bar chart issue

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

luciancotea
Valued Contributor

Re: Sorting in bar chart issue

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
Honored Contributor

Re: Sorting in bar chart issue

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!”