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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Pbiuserr
Post Prodigy
Post Prodigy

COUNTROWS counting wrong

Hello, 

I have a table as a result of the drillthrough like down below 

 

IDCountryGenderSeniorityCompany
ID1COUNTRY1M Company1
ID2COUNTRY2F7Company2
ID3COUNTRY3F Company3
ID4COUNTRY4F Company4
ID5COUNTRY5M Company5

 

ID and Seniority is from one table (Table1 lets call it), rest are from dimension tables.

My formula COUNTROWS (ALLSELECTED (Table1) ) gives me result of 1 (I assume because of Seniority)

 

I tried to do the trick and copy the table, change visual to a card and count distinct, but it also insists that card will be Seniority and also gives count of 1. 

 

Whats the way to count only visible ID in this table?

7 REPLIES 7
v-zhangti
Community Support
Community Support

Hi, @Pbiuserr 

 

Please check the following methods.

Count = COUNTROWS (ALLSELECTED('Table 1'[ID]))

vzhangti_0-1659341834130.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Hi,

I've done similarly to you - INT (COUNTROWS ( ALLSELECTED (FactTable) ) >= 10 )
and in filters on visual took advanced filtering -> "is 1"

Hi, @Pbiuserr 

 

Not fully understood, what kind of results do you expect? Is it possible to show it in pictures?

 

Best Regards,

Community Support Team _Charlotte

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

Ive resolved the issue, everything is fine, thanks

Anonymous
Not applicable

I believe you could duplicate the ID column, extract the first 2 letters & you will be left with just the numbers. Then try COUNTROWS on that column. It might be getting stuck on ID being at the beginning of every value & considering them all the same. Try that and let me know. 

Hey
In reality my ids are just numbers, that was on purpose of dummy data

Anonymous
Not applicable

Are you only trying to get count of how many ID rows are selected or any column in the table?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.