This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hola Comunidad,
Datos de muestra:
| Productid | Viaje | Valor |
| 1 | 1 | 9 |
| 2 | 1 | 9 |
| 3 | 1 | 9 |
| 4 | 1 | 9 |
| 5 | 2 | 9 |
| 1 | 2 | 9 |
| 5 | 2 | 9 |
| 6 | 2 | 9 |
| 7 | 3 | 9 |
| 2 | 3 | 9 |
| 3 | 3 | 9 |
En una página de informe hay una segmentación de datos con "ProductId", si el usuario elige ProductId 2, entonces necesito identificar Trips que tiene este ProductId y sumar todo el valor de Trip.
Para ProductId 2 esto significaría Viaje número 1 y 3, lo que significa que la suma total sería 63 (Viaje 1 total + Viaje 2 total).
¿Se puede hacer esto con DAX?
@BIanon Tengo algo similar resuelto aquí Cómo anular la selección de segmentación de datos para devolver todos los registros | PeryTUS - Proc...
@BIanon ,
Sí, estoy seguro de que esto se puede hacer con una medida. Sin embargo, las variables y las tablas de variables no son mi fuerte. Voy a etiquetar a un par de personas que creo que pueden resolver esto con una medida.
@parry2k , @Jihwan_Kim - espero que pueda prestar una ayuda aquí.
Gracias y saludos,
Gracias por la respuesta.
¿Sería capaz de resolver esto con una medida en lugar de un col calculado?
@BIanon ,
Sí, DAX puede manejar esto. Yo me manejaría así. Cree 2 columnas calculadas:
Trip_Sum = CALCULATE( SUM(Products1[Value] ),
ALLEXCEPT( Products1, Products1[Trip] ))
ProductID_Sum = CALCULATE( SUM(Products1[Trip_Sum]),
ALLEXCEPT( Products1, Products1[ProductId] ))
| Productid | Viaje | Valor | Trip_Sum | ProductID_Sum |
| 1 | 1 | 9 | 36 | 72 |
| 2 | 1 | 9 | 36 | 63 |
| 3 | 1 | 9 | 36 | 63 |
| 4 | 1 | 9 | 36 | 36 |
| 5 | 2 | 9 | 36 | 72 |
| 1 | 2 | 9 | 36 | 72 |
| 5 | 2 | 9 | 36 | 72 |
| 6 | 2 | 9 | 36 | 36 |
| 7 | 3 | 9 | 27 | 27 |
| 2 | 3 | 9 | 27 | 63 |
| 3 | 3 | 9 | 27 | 63 |
Con más tiempo, probablemente pueda hacer esto en un solo paso, pero esto le da más visibilidad a sus cálculos.
Espero que esto ayude.
Saludos
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.