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

Duplicate check in a calculated column

Hello,

 

I am trying to create a calculated column in which I need the count of the times each record exists in my data (i.e. tha number of times I found the same unit). The outcome should look like the example I provide below.

 

 

Screenshot_2.png

 

 

Many thanks for the support.

 

 

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous,

 

Create the following Measure not a calculated column:

 

Duplicate Check = Count(Table[Unit Name])

Then add it to a visual table with the unit name.

 

Regards

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @Anonymous

 

First Add an Index Column using Query Editor as follows

 

1071.png

 

Now you can get the desired calculated column using this formula

 

Duplicate Check =
RANKX (
    FILTER ( TableName, TableName[Unit Name] = EARLIER ( TableName[Unit Name] ) ),
    TableName[Index],
    ,
    Asc,
    DENSE
)

 

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.