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
JohnDahis
Helper III
Helper III

Línea total de tabla, cálculo porcentual de la suma de columnas

¡Buenos días!

Con estos datos, estoy construyendo una tabla simple, mostrando el Total en la parte inferior.

p.s. el Gane% (Vender - Comprar) / Comprar

NombreComprarVenderGane %
John748413.5%
Kate505714.0%
Peter467358.7%

En PowerBI, me da una mesa. el Total Earn% quiero que muestre 25.9%, que es de (214 - 170) / 170 (en lugar de una suma de la columna Gane%).

¿Cómo puedo hacer eso? Gracias.

4 REPLIES 4
amitchandak
Super User
Super User

@JohnDahis , Probar como

Earn % new á sumx(values(Table[Name]),[Earn %])

En su lugar [Earn %] , tiene su cálculo

@amitchandakgracias por su respuesta y adivse.

Yo lo mismo, sin embargo no devuelve lo que se quiere. ¿Cómo puedo corregirlo? Gracias.

Sample.png

Hola @JohnDahis ,

Usted puede tratar de usar una medida. Puede encontrar Nueva medida en la pestaña Inicio.

v-xuding-msft_3-1594703120881.png

Haga clic y cree una nueva medida (Earn %) como se indica a continuación:

Earn % = 
var buy = SUM('Table'[Buy])
var sell = SUM('Table'[Sell])
return
DIVIDE(sell - buy,buy)

5.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.

@v-xuding-msft , eso es increíble! ¡Gracias!

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.