Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
kristenk14
Frequent Visitor

Using a measure on the legend in a pie chart using directquery

I want the smaller pieces that are all less than 1% to be together in an "Other" slice. How can I do this?

I created a measure 

legend=IF( [%_value] <0.01,
    "Other",
    MAX(accounts[name])
)
 
which will put the correct names beneath "Other", but I can't use this measure in the legend.
pie.PNG
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @kristenk14 ,

 

Yes, Legend only accepts entity columns as values.

Please new a calculated column like:

 

Legend = 
VAR _measure = CALCULATE([%_value],ALLEXCEPT('accounts','accounts'[name]))
VAR _legend = IF(_measure>=0.01,'accounts'[name],"Others")
RETURN
_legend

 

and then use it as legend's value.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @kristenk14 ,

 

Any update? If the question is still unresolved, you can continue to add details of the question below and feel free to contact us.😊

 

Best Regards,
Gao

Community Support Team

Anonymous
Not applicable

Hi @kristenk14 ,

 

Yes, Legend only accepts entity columns as values.

Please new a calculated column like:

 

Legend = 
VAR _measure = CALCULATE([%_value],ALLEXCEPT('accounts','accounts'[name]))
VAR _legend = IF(_measure>=0.01,'accounts'[name],"Others")
RETURN
_legend

 

and then use it as legend's value.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors