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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mstrande
Resolver I
Resolver I

Text ending up aligned to the right in a table using UNICHAR (10)

Hi

I need some help. If I use the formula below my text isnt oriented to the right in a table. It get aligned to the right. It doesnt help to realign in the table properties. I Used quick measure and then just added UNICHAR (10). Please advice.

 

VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT('SP VPL Content'[Content])
VAR __MAX_VALUES_TO_SHOW = 25
RETURN
    IF(
        __DISTINCT_VALUES_COUNT > __MAX_VALUES_TO_SHOW,
        CONCATENATE(
            CONCATENATEX(
                TOPN(
                    __MAX_VALUES_TO_SHOW,
                    VALUES('SP VPL Content'[Content]),
                    'SP VPL Content'[Content],
                    ASC
                ),
                'SP VPL Content'[Content],
                Unichar(10),
                'SP VPL Content'[Content],
                ASC
            ),
            ", etc."
        ),
        CONCATENATEX(
            VALUES('SP VPL Content'[Content]),
            'SP VPL Content'[Content],
            Unichar(10),
            'SP VPL Content'[Content],
            ASC
        )
    )

 

M

 

 

1 ACCEPTED SOLUTION
Mstrande
Resolver I
Resolver I

Hi,

Thanks for replay. My problem was that all text ended up aligned to the right. And that was really bad. Then when I tried to do an example the text ended up to the left so I made some test and I made this quick calculation in the dataset instead of the report and it worked. So I cannot explain the rootcause. Thanks for your input.

/M

View solution in original post

3 REPLIES 3
Mstrande
Resolver I
Resolver I

Hi,

Thanks for replay. My problem was that all text ended up aligned to the right. And that was really bad. Then when I tried to do an example the text ended up to the left so I made some test and I made this quick calculation in the dataset instead of the report and it worked. So I cannot explain the rootcause. Thanks for your input.

/M

v-zhenbw-msft
Community Support
Community Support

Hi @Mstrande ,

 

We have a test and we can configure the alignment on the right, like the screenshot below.

 

text1.jpg

 

Maybe you can update the latest version of Power BI Desktop and try again.

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

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

Mstrande
Resolver I
Resolver I

Hi, is there any way I can be more clear? This is a really big problem. I really need som help here.

 

I have a list of content in a program imported via Excel and need these rows in one single cell. So I used the quick measure. But it added the data with a comma between and i wanted the row break so therefore I added Unichar(10). Please advice if you have good ideas here. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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