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
TReynolds
Helper I
Helper I

Totales incorrectos en una tabla para los cálculos de MTD

Hola comunidad de Power BI,

Estoy tratando de calcular los totales de MTD para dos fábricas. Aquí hay algunos datos de ejemplo.

PlantData

FechaPlantaVolumen
01-11-2020A2
01-11-2020B1
02-11-2020A2
03-11-2020A2

Si no filtro por planta, cuando creo una tabla para un cálculo MTD para el 3 de noviembre, obtengo este resultado:

Resultado incorrecto

FechaPlantaMtd
03-11-2020A6
Total 7

La cuestión es que el cuadro total incluye datos de la planta B, aunque no haya datos de volumen para la planta B el 3 de noviembre. Lo que me gustaría ver es esto:

Resultado correcto

FechaPlantaMtd
03-11-2020A6
Total 6

Aquí está el DAX que estoy usando para calcular el MTD:

MTD á TOTALMTD(SUM('PlantData'[Volume]), 'PlantData'[Date])

¿Qué estoy haciendo mal? ¿Cómo puedo arreglar esto? He probado un par de soluciones diferentes, y ninguna ha funcionado. Estos son los enlaces de las soluciones:

Solucionado: Subtotal de tabla sin excluir valores en blanco - Comunidad de Microsoft Power BI

Measure Totals, The Final Word - Microsoft Power BI Community

Ahora puede que no esté aplicando las soluciones correctamente, pero no creo que ese sea el caso

Gracias por ayudar.

Sinceramente

Travis

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hola @TReynolds ,

Puede crear otra medida como se muestra a continuación para reemplazar la medida anterior [MTD]:

Measure = SUMX(VALUES('PlantData'[Date]),SUMX(VALUES('PlantData'[Plant]),[MTD]))

Incorrect totals on a table for MTD calculations.JPGSaludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hola @TReynolds ,

Puede crear otra medida como se muestra a continuación para reemplazar la medida anterior [MTD]:

Measure = SUMX(VALUES('PlantData'[Date]),SUMX(VALUES('PlantData'[Plant]),[MTD]))

Incorrect totals on a table for MTD calculations.JPGSaludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.