Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Kris1
Contributor II
Contributor II

Advance Chart Options

Hi All,

I am having a table with 2 fields, weekenddate and sales. I am showing weekenddate wise sales on bar graph. I want to change dates based on user button selection. Example user select 'Last 13 Weeks' Button, he want to see last 13 weekenddates sale on chart. user clik on 'Last 26 Weeks' he want to see last 26 Weekenddates. How to get this functionality.query.JPG

Labels (1)
2 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

You can use Pick(), Match() combination to get the selected button and value to show.

E.g.

Dimension: WeekEndDate

Measure :

Pick(Match(vVariable,'Last 13 Weeks', 'Last 26 Weeks'),

Sum({<Date = {>= Max(Date) -13}>}Sales),

Sum({<Date = {>= Max(Date) -26}>}Sales)

)

//(Please ignore the syntax)

//vVariable will contain the value which you'll store when you create buttons. (Ex 1,2...)

 

Thanks,
Ashutosh

Kris1
Contributor II
Contributor II
Author

Hi Ashutosh,

Thanks for your reply, I am getting 13 weekend date  sales in my app. But the problem in 13 date one date having zero sales. I uncheck 'include zero values'. I am missing that date, I want to show all dates including zero sales. if i check 'include zero values', it is showing all the date with zero values other than 13 days.

show.JPG

show2.JPG

 

07/11/2021 is missing in second chart after unchecking ' include zero values'.Please give me solution to this.

Thanks and regards

Krish