Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
Solved! Go to Solution.
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.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |