Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bimala0507
Partner - Creator
Partner - Creator

cyclic expression

Hi:

I have created a cyclic expression consisting of expressions  expr1, expr2, expr3 etc. Unlike dimension group, when we create a cyclic expression, it does not give any name to the  group created. So my question is if I want to put a condition when expr1 is selected, how do I achieve so.

In my case, I want to put a reference line ( Target ) only when expr1 is selected. I am finding difficulty in putting this condition and hence reference line is showing for all the expressions.

Appreciate a logical explanation and a solution

Thanks & Regards,

Bimala

9 Replies
MK_QSL
MVP
MVP

Can you post your sample apps?

bimala0507
Partner - Creator
Partner - Creator
Author

Hi Manisha:

Please find attached the screenshot.I want to show the target line for this expression and not for others.


Rgds,

Bimala



Not applicable

hi

helpful answer

Not sure if I understand ,

but on the general tab of the graph you click

show in title in chart which will show the expression selected only.

other way would to have a variable with all the expression labels using = getcurrentfield( myGroup )

hope it helps

thanks

Michael

bimala0507
Partner - Creator
Partner - Creator
Author

Hi Michael:

My problem is to put a if condition, if the expression selected is expr1 than show the reference lines else no. What is myGroup ? When you group a number of expression, it does not give any group name.

Rgds,

Bimala

Not applicable

Hi

please have  look at this link.

http://community.qlik.com/blogs/qlikviewdesignblog/2014/01/31/customizable-straight-table

might help based on your graph but in qv 11 also  please have a look at reference lines in the help section

thanks

Michael

veidlburkhard
Creator III
Creator III

Hi, I think this is not possible on a direct way.

But below I will show you a kind of a work around which might please you.

  1. 1.       Ungroup your expressions in your chart.
  2. 2.       Define a variable for each of your expressions and call them
    vExpression1
    vExpression2
    vExpression3 etc.
  3. 3.       Create an inline load in your script as following:
    LOAD * INLINE [
    ExpressionName, Expression
    YourName1, vExpression1
    YourName2, vExpression2
    YourName3, vExpression3
    ]
    ;
    and press ‘Reload’.
  4. 4.       Create a list box ‘ExpressionName’, select one of the YourName1, 2 or 3 and mark the ‘Only one selected value’ check box.
  5. 5.       Open the ‘Expression’ tab of your bar chart. Delete all expressions and add one new expression: $($(=Expression)). Now the selected expression is shown.
    Depending on your selection in the ExpressionName list box the corresponding expression is displayed. As you may easily see the advantage of this solution compared to grouped expression is that you can uses this for more than one chart at once(!).
  6. 6.       Go to the ‘Presentation’ tab, click on ‘Add’ in the ‘Reference Lines’ menu and define your reference line.
  7. 7.       Mark the ‘Conditional’ check box and key in: GetFieldSelections(ExpressionName) = 'YourName1', if you want to have the reference line together with your Expression 1.

Enjoy it.

Burkhard

bimala0507
Partner - Creator
Partner - Creator
Author

Thanks much Burkhard for your detailed explanation. However in my case list box consisting all expressions is not recommended.

Not applicable

HI

found something that might be helpful for your requirement

http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/07/line-chart-tricks-part-two

you can embed the multibox.

also have the expressions in the script so that they come as fields

thanks

Michael

bimala0507
Partner - Creator
Partner - Creator
Author

Hi Michael:

Thank you so much. I will look into it.

Thanks & Regards,

Bimala