cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Query about SUM or SUMX function / Consulta sobre Funcion SUM o SUMX

Hello good morning, if someone could help me to solve this doubt.

What I want is to add the values ​​of the % column taking into account the Req Padre column. 
As shown in the picture

 

Hola buenos dias , si alguien me podria ayudar a resolver esta duda.

Lo que quiero es sumar los valores de la columna % teniendo en cuenta la columna de Req. Padre
Como se muestra en la imagen

This is what I have /Esto es lo que tengo Captura de pantalla (103).png

This is how I want it to appear / Así quiero que aparezca

Captura de pantalla (104).png

Muchas Gracias

6 REPLIES 6
Syk
Super User
Super User

Something similar to this should get you what you want...

Measure = SUMX( SUMMARIZE(table,table[Req.Padre]), [% column])

 
This should iterate over your table and group the rows by the req.padre field and sum the %

Anonymous
Not applicable

Hello, thank you very much for answering, I think that this formula only works if the column % is a measure, but the data of the column % is taken from another table

 

Hola, muchas gracias por responder creo que esa formula solo funciona si la columna % es una medida , pero los datos de la columna % son sacados de otra tabla

 

Captura de pantalla (105).png

It works with a column, try wrapping the column in the RELATED() function.

RELATED('Datos Oficinas'[%])
Anonymous
Not applicable

Valor del Impacto = SUMX('Datos Oficinas', 'Datos Oficinas'[%])
Also applying this formula gives me the same thing but it does not add the grouped values ​​of the Req.Padre column
 
Tambien aplicando esta formula me da lo mismo pero no me suma los valores agrupados de lso columna Req.Padre

Hi, @Anonymous 

Please check if the following code works.

Measure =
SUMX (
    FILTER ( ALL ( 'Sabana Incidentes' ), [Req.Padre] = MAX ( [Req.Padre] ) ),
    'Datos Oficinas'[%]
)

 Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

It gives me an error, so I applied this formula but it does not add the values ​​that are in the red box as shown in the image

 

Me da error , asi que aplique esta formula pero no me suma los valores que estan el cuadro rojo como se muestra en la imagenCaptura de pantalla (106).png

Measure = SUMX( SUMMARIZE('Sabana Incidentes','Sabana Incidentes'[Req.Padre]),SELECTCOLUMNS('Datos Oficinas',"Total",'Datos Oficinas'[%]))

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.