PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
20.71k stars 1.24k forks source link

Apply Dashboard Filters to Insights on Click #22939

Closed webjunkie closed 1 day ago

webjunkie commented 3 months ago

When clicking on an insight within a PostHog dashboard, it would be highly beneficial for users to view the insight with the dashboard's filters automatically applied. This feature should also provide a clear indication that dashboard filters are in effect, with an option to remove these filters and view the original, unfiltered insight.

Problem: Currently, when users click on an insight within a dashboard, they are taken to the insight view without any of the dashboard's filters applied. This disconnect can lead to confusion and inefficiencies, as users must manually reapply the dashboard filters to analyze data in the same context.

Proposed Solution:

  1. Automatic Filter Application: When an insight is accessed from a dashboard, automatically apply the dashboard's filters (e.g., date range, property filters) to the insight view.

  2. Filter Indicator: Clearly indicate that dashboard filters are applied when viewing the insight. This could be done via a banner or a filter icon with a tooltip explaining the active filters.

  3. Option to Remove Filters: Provide a toggle or button to remove the dashboard filters and revert to the original insight view. This allows users to easily switch between the filtered and unfiltered data.

Benefits:

Additional Context: This feature aligns with existing discussions and enhancements in the PostHog community and GitHub issues. For instance, the need for consistent filter application across insights and dashboards has been highlighted in previous requests and discussions, such as the implementation of HogQL queries with dashboard filters (#15999, #2587).

Implementation:

webjunkie commented 3 months ago

Requested in https://posthoghelp.zendesk.com/agent/tickets/14250