Hello, all,
Is there a way of storing a date in a variable for use in other widgets within the same Dashboard? For example:
At the top of my dashboard, I want to select "August 2021" on a bar chart, which correlates to "Order Date"
I then want to use other matching date fields, such as Attendance Date, Performance Date, etc, but not require the individual to select two (or more) additional charts.
Essentially I would like to store August 2021 as a variable, and set the widgets with different date filters to August 2021 automatically.
Thanks,
Hi Aaron,
In this example, I have Order Date Month on the dashboard filtered to a month. There are two pivot widgets: one that returns Order Date Month and another that returns Performance Date Month. Both have constituent counts. The Order Date widget shows only the month selected in the Order Date dashboard filter. The Performance Date widget also only shows the month from the Order Date dashboard filter.
Inside the Performance Date widget is a widget filter on Performance Date. This uses a ranking type filter returning only the top 1 months where the months difference between the performance date month and the order date month is 0, or they're the same month. If they're equal, return a 1 to the ranking, else return a NULL or nothing back to the ranking for that performance month.
At this point the widget is filtered to the correct performance date, but the values may not return the expected results. The set will still be limited to results where the Performance Date Month and the Order Date Month are the same. So orders with tickets to performances in the selected month, but that have order dates outside the selected month are not included in this Performance Date results without setting each of the values to ignore the Order Date filter.
This should work when selecting multiple months from the dashboard filter:
But I think it'll require that the grain of the dashboard filter and the widget filters be the same (e.g. Months in Date everywhere, or Weeks in Date everywhere, etc.)
Here's my mockup: CommonDateFilter.dash
Hope that helps,Chris
P.S. Even though we can fix the Constituent Count value above to ignore the Order Month filter, we only get back a row in the widget in the first place because there are some tickets (from 2 constituents) where the Performance Month is the same as the Order Month. It occurs to me that there could be a scenario in which there are no orders in the month of the performances that share that same month. In that case, the Performance Date filter would return no performance dates, and there would be no row against which we could render the Constituent Count.