How do I Create a Widget that is "Immune" to Dashboard Filters?
Occasionally you may want to filter all but one widget on a dashboard. Whether you want to compare the numbers of a sub group to the total figures or if its a widget that doesn't make too much sense being filtered, you are able to make any number of widgets "immune" to dashboard filters by following these simple steps.
Video Tutorial: https://www.loom.com/share/6161fcd42e624461ab5df16519607399
In essence we need to point the widget to a dataset that doesn't contain the field we are trying to filter the dashboard on. For example if you are filtering your dashboard on assembly_location, the dataset for the widget cannot include a field called assembly_location so we are going to rename it in our new dataset.
We will have to create a clone or a derived (linked) dataset from the original query. I prefer to use a derived dataset because any changes I decide to make in the original down the road will be applied to this linked dataset.
Go to your query listing and find the query used for the dashboard. On the right hand side click the three dot icon and choose either Create Linked Dataset or the Clone option. Now in our new query we are going to select all, rename the field used in the filter and then omit that field. Our example will look like this:
Select *, assembly_location as location, ~assembly_location;
Now that we have our new dataset we can either create a new visualization from scratch or we can clone an existing widget and change the dataset to the one we have just created.
Now when we filter the dashboard on assembly_location, our new widget will be unchanged. This technique can be done for multiple filters just repeat the step of renaming and omitting those fields in the new dataset.
Now let's say you want a chart with an average line but when you filter the chart you want the average line to represent the total chart not just the data left after the filter is applied.
Video Tutorial: https://www.loom.com/share/3312fe857c8e4c639cbc692d20fb75f3
This can be done by creating a new dataset from scratch, from a clone, or a linked dataset. Next you want to create a field that summarizes your data in your desired manor, by average, moving average, line of best fit, etc. You can then join this new dataset to the original so now the numbers are pre-calculated and wont get changed when the filters are applied.
Please sign in to leave a comment.
0 comments