Forum Discussion
Adding a MISSING value to a pie chart
| Element-ID | Element-Name |
| 1 | First element |
| 2 | Second Element |
| Property Key | Property Value | Element-ID |
| Color | Red | 1 |
| Color | Blue | 2 |
| Size | Small | 1 |
My current naive solution shows only elements that have that property linked to them.
- 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.
4 Replies
- gmsamborn
Super User
I would like to help but I'm a little unclear about your requirements.
Can you show the following?
1) Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/14475233) Please explain how you would expect to get from step 1 to 2.
4) If possible, please show your past attempts at a solution.
I hope this helps.
- AnonymousNot 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 KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.