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
Pandrade
Regular Visitor

¿Cómo enumerar valores duplicados?

Hola,

 

Necesito ayuda con una duda que no consigo resolver

 

Tengo una tabla con los siguientes valores:

 

bi.png

 

Necesito poder enumerar el número de veces que se repite el cliente por orden, es decir, una nueva columna que ponga:

1

2

3

 

Por el momento he conseguido contar el número de veces que se repite cada cliente pero no avanzo más.

 

¡Gracias de antemano!

4 REPLIES 4
Anonymous
Not applicable

Hi @Pandrade ,

 

If there is no column like order column in the table, you need an index column. You can add it in Power Query Editor.

Transform data -> Add Column -> Index Column -> From 1 -> Close and apply.

vcgaomsft_0-1649228738817.png

Please new a calculated column.

Column = 
CALCULATE (
    COUNTROWS ( 'Table' ),
    FILTER(ALL('Table'),'Table'[cliente] = EARLIER ( 'Table'[cliente] )),
    'Table'[Index] <= EARLIER( 'Table'[Index] )
)

Result.

vcgaomsft_1-1649229041327.png

Attach the PBIX file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

Cómo podría escribir esta misma función pero en lenguaje M para poder utilizarla en Power query. Gracias de antemano.

YOUUUU AREEEE THE BESTTT!!!! Naahhh bro thank you so much, I've been stoped in this problem ❤️ thank you

amitchandak
Super User
Super User

@Pandrade , One is to create a new column

 

countx(filter(Table, Table[Client] = earlier(Table[Client]) ) ,[Client])

 

if you need it based on measures you need Dynamic Segmentation

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.