To make the dashboard interactive, I’d like to add a filter at the top that lets the user choose which component(s) they want to explore e.g., Feature A, Feature B, Feature C.
When a user filters the dashboard (e.g., selects Feature A only), the denominator (total price) also gets filtered, which changes the contribution percentage.
For example:
Total price for all components = 100
Feature A price = 20 → Contribution = 20%
But if the user filters the dashboard to Feature A, the total price becomes 20 as well, so the % suddenly becomes 100% which is not meaningful.
Is there a way in Looker to filter which component is displayed, without filtering the underlying rows used to calculate the denominator?
In other words, I want a filter that changes which component contribution metric is shown, but does not restrict the rows used to compute the total price.
b) create a dynamic measure that checks this parameter and uses afterwards only the prices of selected product. Alternatively you can first built a two step approach for more reusability and create a hidden dimension first and later build the measure on top of it
Now you can use the component_selector parameter on your dashboard and the component_contribution_pct as measure. Ideally, you can add an ‘All Products’ parameter value as the default so that you also address a default setting.
This should solve your problem or at least help you to achieve your final target picture on your dashboard.