Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Buenas tardes,
Quisiera preguntar como puedo generar una formula en DAX que me permita ver cuantas veces se repite una variable, esto agregando una nueva columna, lo que por ejemplo en excel usaría la formula CONTAR.SI.
Tengo la siguiente base de datos y el resultado esperado:
Solved! Go to Solution.
Hi @smedina1 ,
add a index column in PowerQuery Editor -> colse and apply.
and new a calculated column:
Repetido =
CALCULATE(
COUNTROWS('Table'),
'Table'[Client] = EARLIER('Table'[Client])
&& 'Table'[Folder] = EARLIER('Table'[Folder])
&& 'Table'[Index] <= EARLIER('Table'[Index])
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
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 on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hola,
No hubo caso ingresar la formula a PQuery asi que intenté otra cosa y me funcinó:
Usé el Modelo de Datos de PIVOT para que me aparezca la opción "Recuento Distinto"
entonces:
en Campos de Tabla Dinámica, click derecho sobre el nombre de la tabla, y agragar medida
"=[Recuento de Folder]-[Recuento Distinto de Folder]"
Es importante que cuando insertes la Tabla Dinámica rellenes la casilla "agregar al Modelo de Datos". De esta manera aparecerá la Opción "Recuento Distinto"
Vé si el resultado es el deseado... a mi me sirve cuando al sistema le dan los Taldos y duplica ingresos.
Hi @smedina1 ,
add a index column in PowerQuery Editor -> colse and apply.
and new a calculated column:
Repetido =
CALCULATE(
COUNTROWS('Table'),
'Table'[Client] = EARLIER('Table'[Client])
&& 'Table'[Folder] = EARLIER('Table'[Folder])
&& 'Table'[Index] <= EARLIER('Table'[Index])
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
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 on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |