Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola,
Necesito ayuda con una duda que no consigo resolver
Tengo una tabla con los siguientes valores:
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!
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.
Please new a calculated column.
Column =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER(ALL('Table'),'Table'[cliente] = EARLIER ( 'Table'[cliente] )),
'Table'[Index] <= EARLIER( 'Table'[Index] )
)
Result.
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
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
@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
User | Count |
---|---|
50 | |
24 | |
18 | |
17 | |
14 |
User | Count |
---|---|
91 | |
86 | |
39 | |
25 | |
20 |