Forum Discussion
me1982
2 years agoFrequent Visitor
Adding a MISSING value to a pie chart
In powerBI I have a table of elements and a table of properties (key and value for each propery) . Properties are linked to elements using an element ID. Not all elements have all the properties. ...
- Anonymous2 years ago
Hi me1982 ,
As you said, measure cannot be applied to pie charts. try the following calculated column.
result_ = VAR elementID = Elements[ElementID] VAR shirtSize = CALCULATE ( MAX ( 'Properties'[Value] ), 'Properties'[Key] = "Shirt Size" && 'Properties'[ElementID] = elementID ) RETURN IF ( ISBLANK ( shirtSize ), "Missing", shirtSize )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi me1982 ,
As you said, measure cannot be applied to pie charts. try the following calculated column.
result_ =
VAR elementID = Elements[ElementID]
VAR shirtSize =
CALCULATE (
MAX ( 'Properties'[Value] ),
'Properties'[Key] = "Shirt Size"
&& 'Properties'[ElementID] = elementID
)
RETURN
IF ( ISBLANK ( shirtSize ), "Missing", shirtSize )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
me1982
2 years agoFrequent Visitor
Thank you.
This seems to give the correct result. However it does require to add a column for each propery key.
Isn't there a simpler way?
- Anonymous2 years agoNot applicable
Hi me1982 ,
For now, probably creating a calculated column is the best way to go.
Best Regards,
Adamk Kong