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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line Chart

Hi all,

I have a line chart and I need to add and remove line of expression via macro (by clicking a button). I want to allow user to see the expression with line and simbol or only with symbol (see File attachment).

What is the correct sintax?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Create a field 'ChartView' with values 'Line and Symbol' and 'Symbol' using the inline function and create a list box with this field (check 'Always one selected value' in the list box property)

In the chart create two expression (use same label for both expression) as follows,

1. =if(ChartView='Line and Symbol',Sum( Sales ))
2. =if(ChartView='Symbol',Sum( Sales ))


In the property of expression 1, check both 'Line' and 'Symbol' in the display option
In the property of expression 2, check only 'Symbol' in the display option

When user selects 'Line and Symbol' in list box, they will see the corresponding expression and vice versa for the 'Symbol' selection.

Hope this resolves your issue.

-Haneesh

View solution in original post

1 Reply
Not applicable
Author

Hi,

Create a field 'ChartView' with values 'Line and Symbol' and 'Symbol' using the inline function and create a list box with this field (check 'Always one selected value' in the list box property)

In the chart create two expression (use same label for both expression) as follows,

1. =if(ChartView='Line and Symbol',Sum( Sales ))
2. =if(ChartView='Symbol',Sum( Sales ))


In the property of expression 1, check both 'Line' and 'Symbol' in the display option
In the property of expression 2, check only 'Symbol' in the display option

When user selects 'Line and Symbol' in list box, they will see the corresponding expression and vice versa for the 'Symbol' selection.

Hope this resolves your issue.

-Haneesh