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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Ayuda con TOTAL SUM

¡Hola a todos!

Tengo la siguiente tabla:

MesIdPeso
Enero110
Enero215
Enero320
Febrero415
Febrero520
Febrero625
Marzo720
Marzo825
Marzo930
Total 180

Necesito crear una medida para obtener el PESO TOTAL y todavía obtiene el resultado correcto, incluso filtro la tabla.

Para el ejemplo, si filtro por mes - Enero e ID 1 y 2, quiero una medida que pueda obtener la suma total.

Algo como esto (columna TOTAL WEIGHT es el resultado esperado que necesito):

MesIdPesoPESO TOTAL
Enero11025
Enero21525
Total 2525

He probado las medidas siguientes:

(CALCULATE(Peso, ALL(ID))
(CALCULATE(Peso, TODO(Mes))
Pero ninguno de ellos funcionó.
Después de eso voy a dividir Weigth / TOTAL WEIGHT para obtener un porcentaje.
Espero haber quedo claro 🙂
¡Por favor, que alguien me ayude!
Gracias 😄
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@henriquemalone ,

Para el peso

CALCULATE(Peso)

para sub total


CALCULATE(Weight, ALLselected(Table))
CALCULATE(Weight, allexpect(Table,Table[Month]))

Además, ¿cómo se puede utilizar removefilters

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hola @henriquemalone ,

Puede crear una medida como DAX a continuación.

TOTAL WEIGHT = CALCULATE(SUM(Table1[Weight]),ALLSELECTED(Table1))



Percent = DIVIDE(SUM(Table1[Weight]), CALCULATE(SUM(Table1[Weight]) , ALLSELECTED(Table1)))


or use the measure:

Percent = DIVIDE(SUM(Table1[Weight]), [TOTAL WEIGHT])

137.png

Saludos

Amy

Equipo de apoyo a la comunidad _ Amy

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@henriquemalone ,

Para el peso

CALCULATE(Peso)

para sub total


CALCULATE(Weight, ALLselected(Table))
CALCULATE(Weight, allexpect(Table,Table[Month]))

Además, ¿cómo se puede utilizar removefilters

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

parry2k
Super User
Super User

@henriquemalone añadir una medida como esta

Total Weight = CALCULATE ( SUM ( Table[Weight] ), ALL ( Table ) ) 

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

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.