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
Guiliam_spa_82
Regular Visitor

Calculo DAX no me funciona

Hola,

 

Por favor, necesito ayuda con mis cálculos en DAX. He creado la siguiente medida la variación entre el consumo real y el teórico de ciertos materiales:

Guiliam_spa_82_1-1679302478646.png

Al volcar la medida en una tabla y segmentar por un material concreto (descripción) el resultado me devuelve productos que no consumen el material segmentado, devolviendo ningún valor en las columnas "Consumo teórico2" y "Consumo real2" y calculando un 100% de desviación.

Guiliam_spa_82_2-1679302641920.png

 

Se que tengo que poner alguna función de filtro en la medida con Calculate. Por favor, ¿Alguien puede ayudarme?

Gracias

 

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

try writing like this:

Variacion % consume real vs. teorico = DIVIDE([Consume real2]-[Consume teorico 2],[Consume teorico 2])

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

try writing like this:

Variacion % consume real vs. teorico = DIVIDE([Consume real2]-[Consume teorico 2],[Consume teorico 2])

Thank you so much for your help Ahmedx. Your solution works as I wanted.

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.