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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

GROUP SUM por fecha única

Hola a todos,

Soy nuevo en Power BI y Dax y actualmente tengo algunos problemas con una de mis medidas.

Necesito contar los Días donde un Empleado reservó más de 10 horas de trabajo.

Los datos sin procesar se ven así. Un empleado puede reservar varias horas por día.

Bildschirmfoto 2020-09-07 um 13.49.53.png

Bildschirmfoto 2020-09-07 um 13.50.04.png

Intenté follwing DAX Expression:

GT10H - CALCULATE(COUNTROWS(DimDate),FILTER(fact_timebits,SUM(fact_timebits[hours])>10))

De causa el resultado es 3, porque la suma total de horas para los tres días es mayor que 10. ¿Existe la posibilidad de tener en cuenta únicamente el tiempo de trabajo diario, por lo que obtengo 1 como resultado?

Gracias por su ayuda!!

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@AB300

¿Puede probar esta medida:

GT10H = 
COUNTROWS(
FILTER(
SUMMARIZE(
    fact_timebits,
    fact_timebits[Date],
    "Total", CALCULATE(SUM(fact_timebits[hours]))
),
"Total">10)
)



________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AB300 , Probar medidas como

Horas: SUM(fact_timebits[horas])
GT10H - CALCULATE(COUNTROWS(DimDate),values(DimDate[date]),FILTER(fact_timebits,[Hours] >10))
sumx(filter(Values(DimDate[date]), [Hours] >10),COUNTROWS(DimDate))

Fowmy
Super User
Super User

@AB300

¿Puede probar esta medida:

GT10H = 
COUNTROWS(
FILTER(
SUMMARIZE(
    fact_timebits,
    fact_timebits[Date],
    "Total", CALCULATE(SUM(fact_timebits[hours]))
),
"Total">10)
)



________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors