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
Anonymous
Not applicable

Compare varias filas de una tabla con una fila en otra

Hola

Tengo dos tablas de ejemplo aquí.

Table1 tiene una lista de personas (1 y 2) y sus números mágicos.

Table2 tiene una lista de personas (1 y 2) y los números que deben ignorar.

ignore.png

¿Cómo creo una medida que me da la suma de números con la excepción (no menos) del número que se debe ignorar?

Preferiblemente usando menor que y mayor que en if instrucción.

1 ACCEPTED SOLUTION

Hola @Preben ,

Por favor, intente así:

Measure = 
CALCULATE(
    SUM(Table1[Hours]),
    FILTER(
        Table1,
        Table1[Date] <MAX(Table2[StartDate]) || Table1[Date] > MAX(Table2[EndDate]) ))

4.PNG

Best Regards,
Xue Ding
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

3 REPLIES 3
parry2k
Super User
Super User

@Preben solución adjunta, es una manera de hacer esto.

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Gracias parry2k, pero no sé si resolverá mi problema. Especificé el uso de if y mayor que/menos que para poder aplicarlo a mi informe real. Creo que esas funciones son imprescindibles.

Aquí está un ejemplo del caso real, y aquí está un enlace a un archivo .pbix de prueba

En mi informe, si las horas en la fecha de la tabla izquierda están en o entre StartDate/EndDate, no deben incluirse en la suma.

ignoredates.PNG

Hola @Preben ,

Por favor, intente así:

Measure = 
CALCULATE(
    SUM(Table1[Hours]),
    FILTER(
        Table1,
        Table1[Date] <MAX(Table2[StartDate]) || Table1[Date] > MAX(Table2[EndDate]) ))

4.PNG

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors