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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
FL
Frequent Visitor

Max of Sum con múltiples filtros

Queridos todos,

Actualmente tengo un problema calculando el máximo de valores de suma por día. Me gustaría poder crear la línea roja en el gráfico de abajo teniendo en cuenta los filtros de la izquierda.

La tabla de origen tiene el siguiente aspecto : DateTime es cada minuto:

2021-01-11_10-39-15.jpg

FL_0-1610356886569.png

He probado muchas fórmulas con SUMX, SUMMARIZE y FILTER, pero no puedo obtener el resultado correcto.

Ej: SumMax á SUMX(SUMMARIZE(Sheet1, Sheet1[Date],Sheet1[Type],Sheet1[Activité], "sum of Max", MAX(Sheet1[Nb])),[suma de Max])

Pero obtengo el siguiente resultado - que no es lo que estoy buscando :

2021-01-11_10-29-53.jpg

Gracias de antemano por su apoyo

1 ACCEPTED SOLUTION

@FL , No estoy seguro en , pero esto primero debe sumar y luego tomar max

medida :
calculate(maxX(values(Table[Datetime]),calculate(sum(Table[Nb]))), filter(allselected(Table), Table[date] á max(Table[date])))

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@FL , Pruebe una medida como

medida :
calculate(max(Table[Nb]), allexcept(Table, Table[date]))

Como

medida :
calculate(maxX(values(Table[Datetime]),[Nb]), allexcept(Table, Table[date]))

Gracias por la respuesta.

Desafortunadamente no funciona.

La primera medida da el siguiente resultado:

FL_0-1610360034505.png

Y el segundo tampoco.

@FL , Asegúrese de que la fecha tiene marca de tiempo.

Inténtalo como

medida :
calculate(max(Table[Nb]), filter(allselected(Table), Table[date] á max(Table[date]))

Funciona cuando solo hay un tipo y una actividad seleccionada:

2021-01-11_11-45-16.jpg

Cuando tengo más de uno va mal (da el máximo de un tipo / activitie) - no suma las actividades a continuación :

2021-01-11_11-47-31.jpg

@FL , No estoy seguro en , pero esto primero debe sumar y luego tomar max

medida :
calculate(maxX(values(Table[Datetime]),calculate(sum(Table[Nb]))), filter(allselected(Table), Table[date] á max(Table[date])))

Gracias:

FL_0-1610365653701.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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