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
AndresPLopez
New Member

Help

  • Buenas,

 

Necesitaría realizar una función o tener una variable que pudiera sumar los días que trabaja cada turno. A lo máximo que he llegado es a:

 

Turnos = 

CALCULATE(

DISTINCTCOUNT('Datos'[TURNO]),

ALLSELECTED('Datos'[FECHA])

)

 

El problema es que tengo varias filas con la misma fecha y con los mismos turnos cada mes, y necesitaría poder ir haciendo un total.

 

 

IMG_20211216_090844.jpg

 

1 ACCEPTED SOLUTION

Hi, @AndresPLopez 

You can try formula as below:

Turnos = 
CALCULATE(COUNT(Datos[TURNO]),ALLEXCEPT(Datos,Datos[FECHA],Datos[TIENDA])
)

If it doesn't work, please share your expected result for further research.

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

Prueba:

Turnos =
CALCULATE (
    DISTINCTCOUNT ( 'Datos'[FECHA] ),
    ALLEXCEPT ( Datos, 'Datos'[TURNO] )
)




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






No funciona,

 

El caso es que quiero contar los días que trabaja cada turno. Es decir, el turno A trabaja dos días en Sevilla y uno en Huelva. Son 3 turnos en total, y no consigo llegar a ese total.

Hi, @AndresPLopez 

You can try formula as below:

Turnos = 
CALCULATE(COUNT(Datos[TURNO]),ALLEXCEPT(Datos,Datos[FECHA],Datos[TIENDA])
)

If it doesn't work, please share your expected result for further research.

Best Regards,
Community Support Team _ Eason

Puedes copiar y pegar la tabla de datos en un mensaje? 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.