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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
MMPagola
Helper II
Helper II

Funcion Sum con filtros

Buenas tardes, me encuentro ante esta dificultad:

El objetivo es sumar la cantidad que cumple con estos requisitos:

  • Que el campo ALTA=TRUE
  • Que el campo DEPOSITODESTINO_ID = 3 
  • Que el campo CodigoTicketDestino contengo en número de pedido.

Probé con la función CONTAINS pero no me lo permitió.

La función que yo armé es la siguiente:

PP ALTA FINAL = CALCULATE(SUM(Movimientos[Cantidad]), FILTER(Movimientos, Movimientos[Alta] = TRUE), FILTER(Movimientos, Movimientos[DepositoDestino_id] = 3), CONTAINS(Movimientos, Movimientos[CodigoTicketDestino], Pedidos[Numero]))

 

MMPagola_0-1628452016200.png

 

Alguna idea de cómo soucionarlo?

Desde ya, muchas gracias

Marce

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @MMPagola ,

 

You could use IN VALUES('table'[column]).

 

PP ALTA FINAL = CALCULATE(SUM(Movimientos[Cantidad]), FILTER(ALL(Movimientos), Movimientos[Alta] = "TRUE" && Movimientos[DepositoDestino_id] = 3 && Movimientos[CodigoTicketDestino] in VALUES(Pedidos[Numero])))

 

 

Best Regards,

Jay

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

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @MMPagola ,

 

You could use IN VALUES('table'[column]).

 

PP ALTA FINAL = CALCULATE(SUM(Movimientos[Cantidad]), FILTER(ALL(Movimientos), Movimientos[Alta] = "TRUE" && Movimientos[DepositoDestino_id] = 3 && Movimientos[CodigoTicketDestino] in VALUES(Pedidos[Numero])))

 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@MMPagola , You have try something like

PP ALTA FINAL = CALCULATE(SUM(Movimientos[Cantidad]), FILTER(Movimientos, Movimientos[Alta] = TRUE() && Movimientos, Movimientos[DepositoDestino_id] = 3 && search(max(Pedidos[Numero]), Movimientos[CodigoTicketDestino], ,0)>0))

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

El numero no debe ser más mayor a cero. No es solución. Gracias

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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