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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
BeAStar
Frequent Visitor

Card not showing correct count when using table visual filters

I have a table with multiple filters (20 or more) that the user can select as needed, Also have slicers that have pre-determined filtering, I want to be able to show on a card the total count of records in the table after applying multiple Visual filters. Currently the card only shows count of records filtered by the slicers but won't change when selecting filters in the visual. In the example total products should show 87 but card count is not showing filtered count

BeAStar_1-1646088222560.png

 

 

2 ACCEPTED SOLUTIONS

@BeAStar okay, I figured out what is going on! Completely a rookie error on my part.  The color filtering you are doing in the Filter pane is at the Visual level, not at the page level.  

 

Below is using the Countrows with a Slicer:

 

TheoC_0-1646167610697.png

 

Below is the Countrows however filtering Color on the table visual:

TheoC_1-1646167672206.png

Ultimately, when you have the slicers in there, and you are filtering, it won't be an issue.  If you want to use the Filter pane options, then just add colour to the page filter level like below:

TheoC_2-1646167730961.png

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

@BeAStar no problem.  As long as you understand that by adding the filter at the Visual level, you are restricting the filter to that Visual.  If you want to have other visuals on the page filtered based on a filter selection, then just move filter from the Visual to the Page level.  This gives you what I gather you are after (e.g. no slicers and the KPI card to give the number of row in the table).

 

TheoC_0-1646260818090.png

All the best with it!

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

11 REPLIES 11
TheoC
Super User
Super User

Hi @BeAStar 

 

Can you please share the measure you're using for your card visual?

 

Thanks,

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

BeAStar
Frequent Visitor

countrows()

@BeAStar 

 

I assume it is "Measure = COUNTROWS ( 'TableName' )"?

 

Is the colour of your products in your products table?  If not, have you established relationships between the various tables?  

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

BeAStar
Frequent Visitor

Yes that's the measure and Yes it is on the same table

Are you able to share some data or the PBIX.  It's likely that there is something in your model that is indirectly / unintentionally creating this.

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

BeAStar
Frequent Visitor

unfortunately I can't, but here is a simple example

 

Name              Gender Child                Color

Colleen RowleyFMarshall WattRed
Colleen RowleyFJagoda WattWhite
Luc WattMMarshall WattBlue
Luc WattMJagoda WattGreen
Marshall WattMJake WattRed
Marshall WattMCorban WattGreen
Sanna BartonFJake WattRed
Sanna BartonFCorban WattWhite
Rikki BrooksMRiley-Jay BrooksBlue
Rikki BrooksMDixie BrooksGreen
Jagoda WattFRiley-Jay BrooksRed
Jagoda WattFDixie BrooksGreen
Riley-Jay BrooksMEvie-Rose BrooksRed
Aila AllisonFEvie-Rose BrooksWhite
Dixie BrooksFEliot RosalesBlue
Andy RosalesMEliot RosalesGreen
Jake WattMLyle WattRed
Jake WattMRomana WattGreen
Meredith SalinasFLyle WattRed
Meredith SalinasFRomana WattWhite
Corban WattMJacqueline WattBlue
Jaya LovellFJacqueline WattGreen
Lyle WattM Red
Romana WattF Green
Jacqueline WattF Red
Evie-Rose BrooksF White
Eliot RosalesM Blue

BeAStar_0-1646138193869.png

 

@BeAStar the 27 count, that suggests there are more records being within the context of the measure. If you want the distinct colour count, you will need to use a different measure that calculates the count of color occurrences by category. I believe you may want to use the count of names in the KPI card and you should get 9 instead of 27.

 

Let me know if it works k.

 

Cheers,

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

BeAStar
Frequent Visitor

unfortunately, I have over 20 different fields that can be filtered at any one time so this would not be a feasible solution, but thank you for the option.

@BeAStar okay, I figured out what is going on! Completely a rookie error on my part.  The color filtering you are doing in the Filter pane is at the Visual level, not at the page level.  

 

Below is using the Countrows with a Slicer:

 

TheoC_0-1646167610697.png

 

Below is the Countrows however filtering Color on the table visual:

TheoC_1-1646167672206.png

Ultimately, when you have the slicers in there, and you are filtering, it won't be an issue.  If you want to use the Filter pane options, then just add colour to the page filter level like below:

TheoC_2-1646167730961.png

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

BeAStar
Frequent Visitor

Thanks @TheoC I have way too many visual filters for user to select and adding them to the page would take the whole page, was hoping to get the count without having to use slicers. Thanks again for the options!!

@BeAStar no problem.  As long as you understand that by adding the filter at the Visual level, you are restricting the filter to that Visual.  If you want to have other visuals on the page filtered based on a filter selection, then just move filter from the Visual to the Page level.  This gives you what I gather you are after (e.g. no slicers and the KPI card to give the number of row in the table).

 

TheoC_0-1646260818090.png

All the best with it!

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.