Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Maddineni_S
Contributor III
Contributor III

change chart values based button selection

Hello Members, 

i am trying to display sales using tree map: dimension as "Country" measure sum({<Month_Number= {">=94"},Fraud_Type=>}sales). but i have Fraud_type column which has 'internal, External' values by default tree map should show internal sales and if i select external button values should change.

can somebody help me.image.png

Labels (1)
2 Replies
edwin
Master II
Master II

there are couple of ways of approaching this.  one way is:
cretae a variable like vFraudType.  in your expression add FraudType={'$(vFraudType)'}.  your buttons should set the variable to either Internal or External - whatever the values are.  

your variable should have a default value

MartW
Partner - Specialist
Partner - Specialist

what you can do to get it working is create 1 variables within the edit mode.

MartW_1-1657202769223.png

 

say vUpdate with a default value like Internal. then in the set analysis you can call that variable and update the messure

sum({<Month_Number= {">=94"},Fraud_Type=$(vUpdate)>}sales) 

then you need the buttons above to know that when you press one of then the vUpdate variable needs to get updated. for this, within the button you can go to actions and navigation and create a new action. set it up just like the screenshot below and you are done

MartW_0-1657202719364.png

 

 

 

if this helped and or was the answer you are looking for, give it a like and accept this as the answer.