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
Nitin_Patil
Frequent Visitor

Power BI Desktop/Service

This observation is about the Power BI desktop/service.
I have a customer table in a semantic model. It has two columns named Customer ID and Customer Name.
Report users want to view Customer ID and Name together in a slicer.
I created a calculated column using both of the columns.
The customer ID is a number, and the Name is a character. The length of the customer ID varies from 4 digits to 9 digits.
The calculated column is -
Customer = CONCATENATE(CONCATENATE(IF(ISBLANK('Customer'[Customer_ID]), BLANK(),'Customer'[Customer_ID]),REPT(" ",(12 - LEN('Customer'[Customer_ID] )))) , IF(ISBLANK('edw DimCustomer'[Customer_Name]), BLANK(),'edw DimCustomer'[Customer_Name]))
The purpose of the calculated column Customer is to concatenate ID and Name but also to start the names aligned vertically, such as

1002 Customer1002
23456 Customer23456
1234567 Customer1234567

The calculated column looks good in Table View but loses the spacing in the slicer.
How can I handle this in the slicer so it does not lose the dynamic spacing?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Nitin_Patil 

 

Power BI slicers don't retain the exact formatting of spaces due to their default behavior that ignores additional white space in text strings. This is why the dynamic spacing in the calculated column is lost when used.

 

You can try padding the Customer ID with leading zeros to ensure that all IDs have the same length, which might help maintain better alignment.

 

Lastly, you might consider providing feedback to Microsoft on the Power BI community forum as a feature request.

Home (microsoft.com)

 

 

 

Best Regards,

Jayleny

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Nitin_Patil 

 

Power BI slicers don't retain the exact formatting of spaces due to their default behavior that ignores additional white space in text strings. This is why the dynamic spacing in the calculated column is lost when used.

 

You can try padding the Customer ID with leading zeros to ensure that all IDs have the same length, which might help maintain better alignment.

 

Lastly, you might consider providing feedback to Microsoft on the Power BI community forum as a feature request.

Home (microsoft.com)

 

 

 

Best Regards,

Jayleny

 

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

Nitin_Patil
Frequent Visitor

Nitin_Patil_0-1704469353887.png

 

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.