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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dual text part on y-axis

Hey,

I've made a dual field in the script like this:

So the text part of this dual function f.e. represents a string of the time run by an athlete, and the number part of this dual function respresents his time in miliseconds.

I've added a - (minus) sign for the number part so that quicker times show up above slower times in a line chart:

So far so good.

But as you can see the y-axis still uses the number part of the dual function. So my question is : Is there any way to get the text part of the dual field on the y-axis?

Alternative: I've tried using a text object that covers the y-axis. But this also didn't work as f.e. min(text(DualResult)) or text(min(DualResult)) returns NULL.

Any help is much appreciated!

9 Replies
Not applicable
Author

yaxis.gif

The picture didn't work, so here it is

Jason_Michaelides
Partner - Master II
Partner - Master II

If your dual field is called DualResult, then does using Text(DualResult) not work?

Not applicable
Author

You mean using Text(DualResult) as the expression?

If you use that as expression you unfortunately get the "No data to display" message in the line chart.

The weird thing is that just using DualResult as expression (like I did in the example) does work for the line itself, but the axis ignores this, and uses the num(DualResult) instead.

Jason_Michaelides
Partner - Master II
Partner - Master II

Can you post your app please?

Not applicable
Author

Here it is

Jason_Michaelides
Partner - Master II
Partner - Master II

Interesting.  Can't see an obvious way - will have another look later.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw. Is that what you need?


talk is cheap, supply exceeds demand
Not applicable
Author

It is definitely helpful. But not perfect yet

For this example it works pretty well, except that I'd need to make the numbers negative (because a lower time is better). For expressions that use f.e. decimals you can fix that by giving it the number format pattern #,##0;#,##0  instead of just #,##0, but that doesn't seem to do the trick for the interval format.

And another thing is that we've got lots of different timeformats for different events. So we'd have to define the time format for each event. That's why I was hoping to do this with the dual function, as the Result field is already in the desired format.

Not applicable
Author

I've gotten one step closer by combining the dual version and the time# version.

first expression: -time#(Result,'mm:ss.fff') (only show symbols)

second expression: DualResult (only show line)

left axis: time#

right axis: dual (hidden)

yaxis.gif

So now the only thing left would be to get rid of the negative values on the y-axis (which could be done by putting a text object over it), and instead of having to define a specific time format for each event a definition of hours/minutes/seconds would do, which Qlikview could calculate itself.