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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
LizziePeters
Helper I
Helper I

sumifs en Power BI

Hola, estoy tratando de averiguar una manera de resumir algunos valores en una columna si se basa en 2 o más criterios.

Usando el siguiente ejemplo, me gustaría crear una fórmula que sume la columna 'derechos totales' SI el Año es 2019 y el ID de transacción es 34.

¡Muchas gracias por su ayuda!

LizziePeters_1-1602750171564.png

1 ACCEPTED SOLUTION

Hola @LizziePeters ,

Puede crear dos segmentaciones de datos en el campo Año e ID de trato y crear el objeto visual relacionado mediante el agregado (Suma) del campo Derechos totales tal como se muestra a continuación.

sumifs in Power BI.png

Saludos
Rena
Equipo de apoyo comunitario _ Rena Ruan
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@LizziePeters , Trate como medida o columna

sumx(filter(Table, Table[year] ?2019 && Table[deal Id] .34),Table[total rights])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

¡Muchas gracias por la rápida respuesta! ¿Qué tal si quiero hacer esto para un conjunto de datos mucho más amplio? Es decir, ¿no quiero mencionar "2019" y "34" en mi fórmula? ¿Me gustaría que la fórmula mirara las celdas de esa columna dada? ¡Muchas gracias!

Hola @LizziePeters ,

Puede crear dos segmentaciones de datos en el campo Año e ID de trato y crear el objeto visual relacionado mediante el agregado (Suma) del campo Derechos totales tal como se muestra a continuación.

sumifs in Power BI.png

Saludos
Rena
Equipo de apoyo comunitario _ Rena Ruan
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@LizziePeters ,

sumx(filter(Table, Table[year] á year(today())-1 && Table[deal Id] 34),Table[total rights])

para [deal Id] puedes usar la cortadora

O usar la inteligencia del tiempo

Ventas YTD á CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales á CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Este año Ventas: CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Ventas del año pasado: CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales - CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Año detrás de Ventas: CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Sólo año vs año, no un nivel por debajo


Este año: CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])))
Last Year ? CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]-max('Date'[Year])-1))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors