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
Syndicate_Admin
Administrator
Administrator

Margen de beneficios

Hola

Estoy trabajando con datos resumidos e im tirando para calcular el margen de beneficio que se llama "EM" en mi modelo de datos. El cálculo en sí es correcto, pero el total no. Me gustaría que redondee al 100%

No tengo ningún dato de costos, así que simplemente estoy haciendo Ganancias / ingresos

Aquí hay una captura de pantalla:

Tmatti92_0-1632139302587.png

Saludos

Tomás

1 ACCEPTED SOLUTION

@Tmatti92 Probar:

m_Total 3
VAR __table = SUMMARIZE(Sales,[Grade],[Service],[Region],"__Value",[m_Single])
RETURN
IF(HASONEVALUE(sales[Region]),[m_Single],SUMX(__table,[__Value]))

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@Tmatti92 Esto parece un problema de medida total. Muy común. Vea mi publicación al respecto aquí: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Además, esta Medida Rápida, Medir Totales, La Palabra Final debería darle lo que necesita:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

@Greg_Deckler Hola Greg gracias por tu respuesta. Todavía parece tener dificultades para calcular el % que he intentado usar su hilo, pero todavía tengo algunos errores.

En primer lugar probé esto:

m_Single = SUMA(Ventas[EM])

Luego, en segundo lugar, esto

m_Total 3

VAR __table = RESUMIR(Ventas,[EM],[m_Single])
DEVOLUCIÓN
IF(HASONEVALUE(sales[in]),[m_Single],SUMX(__table,[in]))
Sería genial si pudieras señalar mi error. Como puedo imaginar, es una solución fácil que no estoy viendo.
Saludos
Tomás

@Tmatti92 Probar:

m_Total 3
VAR __table = SUMMARIZE(Sales,[Grade],[Service],[Region],"__Value",[m_Single])
RETURN
IF(HASONEVALUE(sales[Region]),[m_Single],SUMX(__table,[__Value]))

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.