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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
OsmarBR7
Regular Visitor

Sum filter

 

Hola, tengo la siguiente duda, espero me puedan ayudar.

 

Tengo la siguiente tabla, y debo hacer los calculos en PowerBi con Dax y soy nuevo en la herramienta.

La formula es la siguiente:

 

=E2/(E2+E8+E14)

 

 

image.png

 

 

Revisando los foros me parece que debo unar un calculate pero me calcula todas las  filas.

 

Espero me puedan ayudar

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi OsmarBR7,

 

To achieve your requirement, create a calculate column using DAX formula like pattern below:

Result = 
VAR Total = CALCULATE(SUM(Table1[Value]), FILTER(Table1, Table1[Index] = 1 || Table1[Index] = 8 || Table1[Index] = 14))
RETURN
IF(Table1[Index] = 1 || Table1[Index] = 8 || Table1[Index] = 14, Table1[Value] / Total, BLANK())

Capture.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

No estoy 100% seguro, pero creo que desea agregar solo los valores para los cuales 'Valor' es '30'. No solo debes usar calcular, sino también usar un filtro con él. Prueba esta fórmula.

 

 No estoy 100% seguro, pero creo que desea agregar solo los valores para los cuales 'Valor' es '30'.
No solo debes usar calcular, sino también usar un filtro con él. Prueba esta fórmula.

 

ColumnX =

Var Denominator = CALCULATE(SUM('Table'[Peso Tipo]),FILTER('Table','Table'[Valor]=EARLIER('Table'[Valor])))
Var Numerator = 'Table'[Valor]
RETURN
DIVIDE(Numerator,Denominator,0)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors