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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculating rows

I am calculating duplicates using the formula
 
IsDuplicate = IF( COUNTROWS(Incident) > COUNTROWS(DISTINCT(Incident[Short Description])),TRUE(),FALSE())
 
I am able to get the duplicates in table view as below 
 
VJ1010_0-1680234334472.png

However, I want to count each row and create a card visual to display "4" which is failing. 

I am using 

Duplicate Count = COUNTROWS(FILTER(Incident,Incident[IsDuplicate]=TRUE())) 

but it shows as 

VJ1010_1-1680234530612.png

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Here is how I would go about this:


Test data:

ValtteriN_0-1680237499301.png

Expected result = A to D are duplicates count = 4


Measures:

IsDuplicate = IF(COUNTROWS('Table (27)')>1,1,0) //since the amount of rows above 1 in a set filter context means the row is duplicate I am using this logic

TotalDuplicates = SUMX(SUMMARIZE('Table (27)','Table (27)'[Column1]),[IsDuplicate]) //Instead of booleans I am using 1 and 0 to indicate duplicates this way I can utilize SUMX to get the duplicate amount


End result:
ValtteriN_1-1680237611542.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

Here is how I would go about this:


Test data:

ValtteriN_0-1680237499301.png

Expected result = A to D are duplicates count = 4


Measures:

IsDuplicate = IF(COUNTROWS('Table (27)')>1,1,0) //since the amount of rows above 1 in a set filter context means the row is duplicate I am using this logic

TotalDuplicates = SUMX(SUMMARIZE('Table (27)','Table (27)'[Column1]),[IsDuplicate]) //Instead of booleans I am using 1 and 0 to indicate duplicates this way I can utilize SUMX to get the duplicate amount


End result:
ValtteriN_1-1680237611542.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







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

Proud to be a Super User!




Anonymous
Not applicable

Thanks @ValtteriN  - you are a STAR !!!! 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.