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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ivanvera79
Regular Visitor

COMO SUMAR EL TOTAL DE UN RECUENTO DISTINTO

Hola Amigos! queria pedir ayuda para poder solucionar en DAX el siguiente problema. Tengo una tabla con los campos conductores, con su ID y el campo fecha que muestra "la fecha en que presto servicio" dicho conductor

ivanvera79_0-1621728763063.png

Para poder calcular los dias trabajados utilizo la siguente formula que funciona bien, pero con un detalle. Necesito poder sumar los recuentos distintos de cada chofer y que aparezca en el total del campo. 

 

ivanvera79_1-1621728908533.pngEsta medida recuenta las fechas disntitas de la tabla

ivanvera79_2-1621728963259.png

Como veran el resultado del DISTINC COUNT a nivel de filas funciona bien, pero en el total necesito que sume la cantidad de dias totales de todos los choferes para devolver 43 en vez de 16 dias. 

¿COMO PUEDO SOLUCIONARLO?

desde ya muchas gracias!

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @ivanvera79 

 

Measure =
SUMX ( DISTINCT ( TMS[Conductor1] ), CALCULATE ( TMS[Fin Real] ) )

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.