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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kdeepak300
New Member

Using ties slicer when I concatenate two columns alignment is not matching

Hi, Am using ties slicer am having the Requirement where I need to concatenate two columns. One is string data and one more is numeric data. when i concatenate two columns, the number column is not aligned properly. Below is the Screenshot. I'm using a DAX query to concatenate these two columns but still the second column is not aligned properly. Please give some input.

 

kdeepak300_0-1737002111085.png

 

2 REPLIES 2
v-jianpeng-msft
Community Support
Community Support

Thank you d_gosbell 

Hi, @kdeepak300 

Because your text columns are of different lengths and are case-lowercase, the numbers don't align.
I've tried aligning the text columns with the len function and the rept function, but I didn't have any luck.

vjianpengmsft_0-1737349848826.png

As you can see, the country field is of unequal length, and some are case-sensitive, which will occupy some positions.

This calculates the difference in the number of characters between the current national character length and the maximum national character length

vjianpengmsft_1-1737350018719.png

Although I tried to align the longest string by filling in the difference of each line with a rept, it failed to align due to case issues.

vjianpengmsft_3-1737350294923.png

vjianpengmsft_2-1737350154373.png

Of course, we can think about it the other way around, whether to make it all uppercase and then align it:

vjianpengmsft_4-1737350426204.png

This is still problematic because the space occupied by each letter is not the same. If you are interested in learning more about him, you can download this sample PBIX file below.

 

 

Best Regards

Jianpeng Li

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

 

 

 

 

 

d_gosbell
Super User
Super User

How are you attempting to do the alignment?

Are you padding the data with spaces? If so you would need to use a fixed width font like Consolas or Courier New

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.