Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'd like to know if there's a simple way I can implement a default start on my calendar filter. I want the default start to be the last 7 days available on the data.
Another option is to limit the chart to the last 7 days, but the limit should be lifted if the user selects more than 7 days on the filter.
Thank you!
Roebrich
Thank you for the responses, I found exactly what I need on this link: https://www.youtube.com/watch?v=UTDyO68BYL8
Could be this?
Use this in your Max arbitrary from calendar properties
If(GetFieldSelections(DateField)>=7, Max(DateField)-7)
Thank you for your response. I tried your suggestion, here is what I did:
1. Created a variable to hold my date field.
2. Changed my calendar filter to look at the variable I just created
3. I edited the max value to be "=If(GetFieldSelections(opened_at_date)>=7, Max(opened_at_date)-7)"
4. min is set to 0 (this was the default after I selected variable).
After applying the steps above, clicking on the filter makes the application not respond. Anything I'm doing wrong?
**Also side note, a new requirement has arrived and instead of the original on my post, we should now have 2 filters using the same field which will determine the start and end date. Start date should be defaulted to day 1 of the current month and end date should be today's date
I haven't seen any variable in your 3rd statement. if not required, What is the use of 2 variables?
create a flag in calendar like below
if(today() - Date <= 7,1,0) as Last7DaysFlag
Now you can use the expression in chart
sum({<Last7DaysFlag={1}>}sales)
Thank you for the responses, I found exactly what I need on this link: https://www.youtube.com/watch?v=UTDyO68BYL8