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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rohitMe
Advocate I
Advocate I

Custom Legend

Hi,

 

I want to create a visualisation that is similar to the one given below:

output sampleoutput samplesample datasample data

 

I require the percentage of "Out City" entries for each zones and want the legend to show details as shown in the sample graph.

Ask for any clarification if needed

 

Thanks and Regards

Rohit 

 

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

Hi @rohitMe

Create calculated columns

percentage =
CALCULATE (
    COUNT ( Sheet3[category] ),
    FILTER ( ALLEXCEPT ( Sheet3, Sheet3[zones] ), [category] = "O" )
)
    / CALCULATE ( COUNT ( Sheet3[category] ), ALLEXCEPT ( Sheet3, Sheet3[zones] ) )
flag1 = IF([percentage]>0.4,"up","down")

Add column "flag1" in the Legend field, "percentage" in the Value field

4.png

 

 

Best Regards

Maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @rohitMe

Create calculated columns

percentage =
CALCULATE (
    COUNT ( Sheet3[category] ),
    FILTER ( ALLEXCEPT ( Sheet3, Sheet3[zones] ), [category] = "O" )
)
    / CALCULATE ( COUNT ( Sheet3[category] ), ALLEXCEPT ( Sheet3, Sheet3[zones] ) )
flag1 = IF([percentage]>0.4,"up","down")

Add column "flag1" in the Legend field, "percentage" in the Value field

4.png

 

 

Best Regards

Maggie

sukumararumugam
Frequent Visitor

Can you share the sample data, will help you on this!

 

Thanks!

Hi @sukumararumugam

 

I wont be able to share with you the data but it is similar to the data table which I have posted in my original question.

 

Thanks and Regards

Rohit

Hi Rohit,

 

I would suggest you to create pie chart with legends on and then resize the chart to only show the legends.

 

There is no way you can create a custom legends in Power BI as far as I know. 

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.