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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
wshenc26
Regular Visitor

How to replace the value of x-axis based on another column

Given the data below:

Column1Column2Value
A_001Alex50
A_002Alex

80

A_003Betty

70

I am creating a column chart based on the data above. I put Column1 as my X-axis and Value as my Y-axis.

However, I do not want the X-axis value to show as A_001/A_002. I would like it to show the name such as Alex in Column2

I cannot put Column2 as my X-axis because there are chances of identical values as shown in the table, which will merge and stack up the value by Power Bi.

Can anyone advise?

5 REPLIES 5
Anonymous
Not applicable

I have added an index column in Power Query and concatenated it with your Column2, to create a column named "Custom".

Required Output: 

VishalJhaveri_6-1672125019972.png

Note: You won't be able to eradicate "1-" ; "2-" and achieve the required outputs.


Steps:
You can follow the below images to achieve the required output.

VishalJhaveri_0-1672124880908.png

 

VishalJhaveri_2-1672124928531.png

 

VishalJhaveri_3-1672124934045.png
VishalJhaveri_4-1672124943865.png

 

 

 


Thank You.
If this solution answers your question, do mark it as Solved.

Hi, thank you for your answer. However, the index 1, 2, 3 in the text doesn't seem clean to me. But thanks anyway!

Mahesh0016
Super User
Super User

@wshenc26 

Mahesh0016_0-1672125088747.png

>> Create New Column : 

col1&col2 = CONCATENATE(replace_Table[Column1],CONCATENATE("/",replace_Table[Column2]))

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

Hi, I have thought of concatenating with other columns to make it an unique value. However, the text is just too long after the concatenation. Is there anyway to only show certain number of characters in the visual?

can you share sample output format.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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