Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
07/11/2021 is missing in second chart after unchecking ' include zero values'.Please give me solution to this.
Thanks and regards
Krish