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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
CountisBroken
New Member

Count function is doubling

Hi

 

I have a card visual. 

 

The count function is doubling everything. Both via a measure and via the "aggregation" option where you choose sum, average, count etc. 

I've checked the table. There are definitely only 481 rows when I filter with the exact same filters i'm using in the visual. 

 

I've removed all relationships from the table and tried again, still getting doubled to 962.

 

Any ideas? 

 

1 ACCEPTED SOLUTION
CountisBroken
New Member

Hi

Apologies, my dataset had duplicate values under a different file source name - I was filtering on file source assuming they were the only ones containing the data I was analysing - there were other files that had the exact same data. Just another by-product of having to work around your IT team, rather than with them. 

View solution in original post

5 REPLIES 5
CountisBroken
New Member

Hi

Apologies, my dataset had duplicate values under a different file source name - I was filtering on file source assuming they were the only ones containing the data I was analysing - there were other files that had the exact same data. Just another by-product of having to work around your IT team, rather than with them. 

v-ssriganesh
Community Support
Community Support

Hi @CountisBroken,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @Ray_Minds & @danextian for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

 

Thank you for being part of the Microsoft Fabric Community.

ryan_mayu
Super User
Super User

@CountisBroken 

 

could you pls provide some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ray_Minds
Solution Supplier
Solution Supplier

Explanation:
The issue comes from how COUNT works in DAX and visuals:

  • COUNT(Table[Column]) counts non-blank values in that column, not rows.
  • If the column being counted has multiple values per row in the current filter context (or is expanded by auto-exist combinations in the visual), the count can double.
  • The built-in “Count” aggregation in visuals behaves the same way.

     

    Solution:

    Use COUNTROWS instead of COUNT:

    This counts the actual rows in the filtered table, so your card should display 481.

    If you need unique values of a column, use: DISTINCTCOUNT

    UniqueValue = DISTINCTCOUNT ( Table[Column] ) 


    How to Validate

    • Add both RowCount and your original measure to a table visual with the same filters.
    • Confirm RowCount = 481 while COUNT = 962.
    • Replace the card’s aggregation with RowCount
danextian
Super User
Super User

Hi @CountisBroken 

In the table view, does it also show only 481 rows? Adding fields to a table visual can remove duplicate rows, so it’s not always a direct comparison of the actual row count in the dataset. The COUNT function counts all rows in a column regardless of duplicates—try using DISTINCTCOUNT instead. If the issue persists, consider sharing a non-confidential copy of the PBIX file.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.