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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
FrancoPS
New Member

change data text

Hi!

I need to change the legend text of my graphic, it has numbers from 0 to 2, and i need to change to "completed" when is 0, "incompleted (back to menu)" when is 1, and "incompleted (logout)" when is 2.

FrancoPS_1-1632617545714.png

img of the graphic, thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @FrancoPS ,

 

You can create a calculated column using SWITCH. Be careful not to add quotation marks around the numbers.

Column = SWITCH([legend],0,"completed",1,"incompleted (back to menu)",2,"incompleted (logout)")

11.png10.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @FrancoPS ,

 

You can create a calculated column using SWITCH. Be careful not to add quotation marks around the numbers.

Column = SWITCH([legend],0,"completed",1,"incompleted (back to menu)",2,"incompleted (logout)")

11.png10.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This was exactly what I needed, thank you very much!

Greg_Deckler
Community Champion
Community Champion

@FrancoPS Depending on your data, add a column in your data model to use a SWITCH statement to return the desired label based upon the column used in your legend. Use this column instead of the column you are currently using.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.