Forum Discussion
Is it possible to create a Bar Chart based on a filtered Table Visual?
I have a table visual which is filtered on a measure having values greater than zero.
How could I use the filtered results to create a bar chart? Not sure if that is even possible but would be interesting to explore.
Thank you, Bal.
11 Replies
- VahidDM
Super User
Hi Bal_Singh
Yes, you can create a bar chart based on the same filtered data as your table visual. Since you cannot directly link a bar chart to a table visual's output, you can achieve this by applying the same filters to the bar chart:
-
Use the Same Measure Filter:
- In your bar chart, add the measure you're using in the table visual.
- Apply a visual-level filter to the bar chart by dragging the measure into the Filters on this visual pane.
- Set the filter condition to show values greater than zero, matching the table visual's filter.
-
Ensure Consistent Filtering:
- If your table visual uses slicers or page-level filters, make sure the bar chart is also influenced by these filters.
- This keeps both visuals in sync, displaying the same filtered results.
By applying identical filters to both visuals, your bar chart will reflect the filtered data from the table visual.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- Bal_Singh
Helper I
Thank you VahidDM ,
I already tried this but unfortunately did not work. The bar chart still calculates values unfiltered even though I applied the same 'measure' filter on the visual as you mentioned above.
Illustrated below. The bar chart keeps showing 100% despite the filter whereas I expect 56% whic is based on the filtered visual (Table2):Table 1 Account ID Opening Balance Withdrawal Withdrawal % of Opening Balance ABC 999 555 56% XYZ 0 444 TOTAL 999 999 100% Table 2 - Filtered on Opening Balance > 0 Account ID Opening Balance Withdrawal Withdrawal % of Opening Balance ABC 999 555 56% TOTAL 999 555 56% - VahidDM
Super User
Can you share the PBIX file after removing sensetive data?
-
- Kedar_Pande
Super User
In Power BI, you cannot directly "reuse" a filtered table visual’s results for another visual. However, you can recreate the same filtering logic using DAX to achieve the same results for your bar chart.
If you want to explicitly "capture" the filtered results, you can create a calculated table to hold the data where your measure is greater than zero. Then use this calculated table for your bar chart.
FilteredTable =
FILTER(
'Sales',
[Revenue] > 0
)Now, build the bar chart using fields from FilteredTable.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn- Bal_Singh
Helper I
Thank you Kedar_Pande ,
I thought of this too but the issue here is that underlying data is also dynamically caluclated measures and not a Table as such. I'll be uploading the pbix soon with masked data (Not sure if this would be possible due to limitations). Hopefully that will help. Thanks.- Kedar_Pande
Super User
Please share a simplified version of your PBIX file (in English) without sensitive data. You can upload it to a public cloud service like OneDrive, Google Drive, or Dropbox and share the link. This will help in understanding your data structure and the issue, allowing for more precise guidance.