Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Buenas tardes a todos, estoy intentando ponderar valores de una tabla para diferentes atributos (proteina, humedad, grasa, etc...).
En la columna de Cantidad tengo valores en todas las fechas, sin embargo en las columnas de atributos tengo algunos valores "null".
El problema que tengo es que el calculo ponderado le esta asignando valor "0" a estos valores nulos y me desvirtua el resultado final.
Como debo hacer para indicarle a la medida utilizada que cuando haya un valor nulo (null) no tenga en cuenta esa fila en el calculo?
Este es el código que estoy utilizando para hacer el promedio ponderado:
M, gracias!
Solved! Go to Solution.
Vea si filtrar espacios en blanco (nulos) ayuda:
ACIDEZ (P) =
CALCULATE (
DIVIDE (
SUMX ( GIRASOL, GIRASOL[CANTIDAD] * GIRASOL[ACIDEZ] ),
SUM ( GIRASOL[CANTIDAD] )
),
NOT ISBLANK ( GIRASOL[CANTIDAD] )
)
Hi, @MARMAXCHEROT ;
Muchas gracias por sus respuestas, pude solucionarlo con las alternativas propuestas por ustedes.
Saludos!
Hi, @MARMAXCHEROT ;
Podrías probarlo.
ACIDEZ (P) = DIVIDE(
SUMX ( 'GIRASO', 'GIRASO'[CANTIDAD] *'GIRASO'[ACIDEZ] ),
CALCULATE( SUM(GIRASO[CANTIDAD]),'GIRASO'[ACIDEZ]<>BLANK()))
El resultado final se muestra a continuación:
Saludos
Apoyo a la comunidad Team_ Yalan Wu
Si esta publicación ayuda,entonces considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
Vea si filtrar espacios en blanco (nulos) ayuda:
ACIDEZ (P) =
CALCULATE (
DIVIDE (
SUMX ( GIRASOL, GIRASOL[CANTIDAD] * GIRASOL[ACIDEZ] ),
SUM ( GIRASOL[CANTIDAD] )
),
NOT ISBLANK ( GIRASOL[CANTIDAD] )
)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.