Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Bal_Singh
Regular Visitor

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 11
Kedar_Pande
Community Champion
Community Champion

@Bal_Singh 

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

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.

Hi @Bal_Singh ,

 

I think you issue should be caused by using "100% Stacked bar chart". I suggest you to try "Stacked bar chart".

vrzhoumsft_0-1731984550034.png

vrzhoumsft_1-1731984775876.png

If this reply still couldn't help you solve your issue, please share a easy sample with us and show us the result you want.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-rzhou-msft ,
Thank you, your method is quite clear for a simple model.
I tried your method to my model but it did not work for me unfortunately.
Possible reason being my model is bit more complex in the way measures are being calculated.
I would like to upload my masked model but unable to do so in this portal and I can't upload it to any personal cloud due to limitations. Any suggestion would be great. Thank you! Bal.

Hi @Bal_Singh ,

 

I think you can show us more detilas about your table and the data model like relationships/measures and so on.

You can create a easy sample file or data source to us and give us the measure you are using.
We need to reproduce the issue.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

VahidDM
Super User
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:

  1. 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.
  2. 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!! 

LinkedIn|Twitter|Blog |YouTube 

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 IDOpening BalanceWithdrawalWithdrawal % of Opening Balance
ABC99955556%
XYZ0444 
TOTAL999999100%
    
    
Table 2 - Filtered on Opening Balance > 0   
Account IDOpening BalanceWithdrawalWithdrawal % of Opening Balance
ABC99955556%
TOTAL99955556%

Can you share the PBIX file after removing sensetive data?

How do I upload the pbix file with masked data? Thanks. It didn't let me so asking.

I'll try to save a version without sensitive data and share in the coming week. Thanks for help.

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.