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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors