Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bashdown
Contributor
Contributor

dual function, avg by numeric value, display text string?

Sorry for multiple questions – I have spent a long time looking for answers to these before posting.  Thanks in advance for you time and patience.

I have below a section of a larger nested if() statement that I'm using as a measure on a line graph.  What I am trying to do is to use the dual() function assign a text and numeric value to each average.  I would like to plot my graph according to the numeric value, but have the labels show the text string.  Is this possible?

if(avg([Diff Value])<11.6 and avg([Diff Value])>=11.4,dual('5.11b', 11.4),

  if(avg([Diff Value])<11.8 and avg([Diff Value])>=11.6,dual('5.11c',11.6),

     if(avg([Diff Value])<12 and avg([Diff Value])>=11.8,dual('5.11d',11.8),

          dual('5.12a',12.2)

        )

      )

   )

Thanks again,

Brayden

1 Solution

Accepted Solutions
NZFei
Partner - Specialist
Partner - Specialist

Change number formatting to Measure expression:

View solution in original post

9 Replies
NZFei
Partner - Specialist
Partner - Specialist

It should work. What is the problem?

bashdown
Contributor
Contributor
Author

I'm not sure – how to you make it report the text string as a label?  It works to use the numeric value to create an average, but the label for each data point and the axis are also numeric values and not the text string. 

Is what I want to do possible, or will the text string only show up in a table or some other place that expects strings?

pradosh_thakur
Master II
Master II

would you be able to share a sample ?

regards

Pradosh

Learning never stops.
bashdown
Contributor
Contributor
Author

Here is what I was working with – this is just some made up data, but it is the actual implementation I was looking for.  Specifically in the top left combo chart, I would like the average grade climbed to be calculated using the nested if()s, but was hoping to use the text string as a label.

NZFei
Partner - Specialist
Partner - Specialist

Change number formatting to Measure expression:

bashdown
Contributor
Contributor
Author

That's amazing.  And very simple.  Thank you for taking the time to help me along as I teach myself.

Neymar_Jr
Creator II
Creator II

Hi Fei Xu,

Why can't i see the the Measure Expression option in the Number formatting tab?

Regards,

Rajesh

NZFei
Partner - Specialist
Partner - Specialist

Try using the new version Sep 2017.

Neymar_Jr
Creator II
Creator II

Okay.

I thought that this feature would be available on all the versions!

Regards,

Rajesh