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

Announcements
Qlik Unveils New Agentic Capabilities Across Analytics, Data Engineering, and Trust: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
thakurdagautam
Partner - Contributor III
Partner - Contributor III

Using BUTTON to select YTD, MTD, QTD for a single chart

I am using Qliksense and i wanted to use the BUTTON in the charts to directly toggle between YTD, MTD, so on for a single chart. ANy idea how i might do so?

 

1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Hi @thakurdagautam ,

You can do this using button or variable input component.

Pass the value to the variable through the button and use the expression in the chart accordingly.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

5 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @thakurdagautam ,

You can do this using button or variable input component.

Pass the value to the variable through the button and use the expression in the chart accordingly.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
abhijitnalekar
Specialist II
Specialist II

Hi @thakurdagautam ,

 

Please do the steps as below.

1.  drag Input varaiable to the sheet

abhijitnalekar_0-1634556848714.png

2. in input variable property select Buttons

abhijitnalekar_1-1634556963024.png

3. set values for the buttons as below

abhijitnalekar_2-1634557301768.png

 your input variable will look as below

abhijitnalekar_3-1634557364640.png

4. set the variable for the input variable 

abhijitnalekar_4-1634557434645.png

 

Once this is set you can change the measue expression in the line or bar chart.

assuming that your YTD and MTD expressions are ready with you. 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
thakurdagautam
Partner - Contributor III
Partner - Contributor III
Author

Thank you very much. Will attempt

Nisha25696
Contributor
Contributor

Can u please add the demo expression for YTD and MTD sales also

abhijitnalekar
Specialist II
Specialist II

MTD : Sum({<Date={">=$(=Num(MonthStart(Max(Date))))<=$(=Max(Date))"}>} Sales)

YTD : Sum({$<Year=,Month=, Date={'>=$(=YearStart(Today()))<=$(=Today())'}>}Sales)

 

Hope this help

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!