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

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
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.