Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hola, ¿cómo escribir una fórmula dax para sumar todos los valores del valor de la columna en función de las siguientes condiciones?
La primera condición es que necesitamos agrupar por ID1
La segunda condición es que solo sumamos valores del valor máximo de ID2
ID1 | ID2 | Valor |
12 | 5543 | 100 |
31 | 4125 | 150 |
31 | 6412 | 50 |
31 | 1333 | 300 |
En este caso, la suma debe devolver 100 + 50 = 150.
Pruebe esta medida:
Sum of Max Value =
VAR vBaseTable =
ADDCOLUMNS (
VALUES ( 'Table'[ID1] ),
"@MaxID2", CALCULATE ( MAX ( 'Table'[ID2] ) )
)
VAR vFilterTable =
TREATAS ( vBaseTable, 'Table'[ID1], 'Table'[ID2] )
VAR vResult =
CALCULATE ( SUM ( 'Table'[Value] ), vFilterTable )
RETURN
vResult
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.