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: 
steveb24
Contributor II
Contributor II

Automatically Showing different Measures in a Chart

I have a table with values 

Date Call Count Lead Count
1/1/2024 5 3
1/2/2024 10 6
1/3/2024 15 9

 

I'm trying to create a line chart that will show either the call count by date or lead count by date.  I was thinking if I had buttons above the chart, one saying calls and the other saying leads, then users could click the one they want to show.  I've seen several topics about this but they are explained very poorly.  Can someone provide the step by step?  I'm using Qlik Saas.  Thanks!

Labels (1)
2 Replies
Brian_C
Contributor III
Contributor III

Hi

You are on the right lines.

1 create a variable 

2 apply different values to the variable using the two buttons

3 create two measures in the line chart, one for calls and one for leads

4 in the properties of each measure set conditions to show/hide the measure such as variable =1 for the calls and variable = 2 for the leads.

once you click either button the selected measure will be shown in the chart.

Hope this helps.

Brian  

MatheusC
Specialist
Specialist

Hi,
@steveb24 

Follow a few simple steps:
1 - Create a variable to call in your charts
vButton = Call

MatheusC_0-1718910523305.png

 



2 - In the button chart then insert your variable and the corresponding values:
1 value vButton = Call
2 value vButton = Leads

--- graph used "variable imput" ---

MatheusC_1-1718910554441.png

 

3 - So on your graph. Then alternate between the measures using the pick function and the match function

pick(Match('$(vButton)','Call','Leads'), Count(valuesCall),Count(valuesLeads))

Change the values according to your data.


-
Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!