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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Need guidance on how to handle the dynamic text alignment based on selected value

Can someone please guide me how to change the text alignment based on selectedvalue.

In report , I have Language Type slicer which has Hebrew,Engligh etc. and we have table with question and responses which need to aligned based on language Type.
In case of Hebrew, text should be aligned from right to left as they read and write from right to left. However, english should be from left to right.

Also, is there a way to change the direction of text and not reverse the text. (SQL solution will also help )
For example :
Text :This is test report
Output : report test is this 

Thanks in Advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous , 

Does that make sense? If so, kindly mark my answer as the solution to close the case and help more people find the answer please.  Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

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

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous , 

Does that make sense? If so, kindly mark my answer as the solution to close the case and help more people find the answer please.  Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

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

Anonymous
Not applicable

Hi @Anonymous ,

Power BI Desktop does not support this feature at the moment. Please vote here: Right to left full support 

 

You can only change the order in Power Query. I have alse found a video about it, please refer to it to see if it helps you.

Use PowerQuery to Change the Order of Cell Values or Text 

 

Best Regards

Community Support Team _ Polly

 

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

 

Anonymous
Not applicable

@Anonymous Thanks for the information , I have voted for right to left support.

Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

vpollymsft_0-1646724653167.png

Firstly, spilt the column.

vpollymsft_1-1646724708515.png

Then Unpivot the columns.

vpollymsft_2-1646724823105.png

Thirdly, Added index.

vpollymsft_3-1646724919445.png

Fourthly, sort rows.

vpollymsft_0-1646725128181.png

Then transpose the table.

vpollymsft_1-1646725206977.png

And next is removing top rows.

vpollymsft_2-1646725268081.png

Then change the type to text.

Finally, select all the columns and then right click to choose merge columns.

vpollymsft_3-1646725374322.png

vpollymsft_4-1646725387104.png

Or please refer to my code.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCsnILFYAopLU4hKFotSC/KISpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [column = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"column", type text}}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "column", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"column.1", "column.2", "column.3", "column.4"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"column.1", type text}, {"column.2", type text}, {"column.3", type text}, {"column.4", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {}, "Attribute", "Value"),
    #"Added Index" = Table.AddIndexColumn(#"Unpivoted Columns", "Index", 1, 1, Int64.Type),
    #"Reordered Columns" = Table.ReorderColumns(#"Added Index",{"Attribute", "Index", "Value"}),
    #"Sorted Rows" = Table.Sort(#"Reordered Columns",{{"Index", Order.Descending}}),
    #"Transposed Table" = Table.Transpose(#"Sorted Rows"),
    #"Removed Top Rows" = Table.Skip(#"Transposed Table",2),
    #"Changed Type2" = Table.TransformColumnTypes(#"Removed Top Rows",{{"Column1", type text}}),
    #"Merged Columns" = Table.CombineColumns(#"Changed Type2",{"Column1", "Column2", "Column3", "Column4"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged")
in
    #"Merged Columns"

 

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

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

Anonymous
Not applicable

Hello @Anonymous , Thanks very much for your response.
Actually, I have to do this for one particular language (Hebrew) and also apply right alignment on column. I was thinking if we can do something with DAX measure where I can just write if Hebrew language is selected then transform the text and also apply right alignment .

In report , I have Language Type filter and Table chart.


Please let me know if we can achieve using this approach .
I really appreciate your time and effort.
Thanks a lot

amitchandak
Super User
Super User

Anonymous
Not applicable

Thanks for your response @amitchandak . 
I will take a look the link you have shared .Basically, I want to avoid creating bookmark (we have more than 10  langauges ) and achieve this in existing report.

Any idea about the below request 
Also, is there a way to change the direction of text and not reverse the text. (SQL solution will also help )
For example :
Text :This is test report
Output : report test is this 

Thanks,
Sarika

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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