Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Pick breaks continuous x-axis

I have a 15 minute interval dimension on x-axis created by 

=Time(event_hour&':'&event_quarter,'hh:mm')

This works and Qlik recognizes it and sets the continuous chart with proper time axis (from 0:00am to 12:00pm):

withoutpick.png

However when I try to use it in pick function like this:

=Pick(vComparison,Selection1, Selection2, Time(event_hour&':'&event_quarter,'hh:mm'))

The x-axis breaks and shows 0.00 to 1.00 instead of hours. 

withpick.png

 

Any way to fix this?

1 Solution

Accepted Solutions
Highlighted

Re: Pick breaks continuous x-axis

Not so pretty, but a work around still... try this

=$(=Pick($(vPick), 'Interval', 'Time'))(pick($(vPick),event_hour,event_hour&':'&event_quarter),pick($(vPick), 'D', 'hh:mm'))

View solution in original post

10 Replies

Re: Pick breaks continuous x-axis

Are Selection1 and Selection2 fields are also time field? if they are, then may be this

=Time(
    Pick(vComparison, Selection1, Selection2, event_hour&':'&event_quarter)
,'hh:mm')
anseglko
Contributor

Re: Pick breaks continuous x-axis

Hi,

Unfortunately they are not. They are month and day fields.

Re: Pick breaks continuous x-axis

Not sure, but may be try this

=Pick(vComparison,
   Selection1,
   Selection2,
   Time(Time#(event_hour&':'&event_quarter,'hh:mm'),'hh:mm')
)
anseglko
Contributor

Re: Pick breaks continuous x-axis

Tried, doesn't work.

I'm starting to think it's a bug in Qlik that can't be fixed.

Re: Pick breaks continuous x-axis

Not really sure because I have not tested it. If you are able to share a sample qvf where we can see the issue, I am more than happy to check it out.

anseglko
Contributor

Re: Pick breaks continuous x-axis

Here is a sample qvf with event_hour and event_quarter and some random values. The top graph shows the x-axis misbehaving when using pick, and the bottom chart shows the  same thing working without pick.

(Press button 2 to switch to the event_hour&':'&event_quarter dimension)

Highlighted

Re: Pick breaks continuous x-axis

Not so pretty, but a work around still... try this

=$(=Pick($(vPick), 'Interval', 'Time'))(pick($(vPick),event_hour,event_hour&':'&event_quarter),pick($(vPick), 'D', 'hh:mm'))

View solution in original post

anseglko
Contributor

Re: Pick breaks continuous x-axis

Interesting. That works well on the Desktop app, but not in the web app. Still have time range from 0.00 to 1.00. Great solution though! No idea why it doesn't work in web app.

Re: Pick breaks continuous x-axis

May be desktop and web have different versions?