Forum Discussion

netanel's avatar
netanel
Post Prodigy
5 years ago
Solved

Data left to right

Hello everyone!

 

My data comes from left to right (in Hebrew you read from right to left)

 

 

 

 

 

 

 

 

 

 

Anyone know how to change them so that they come from right to left?

 

  • Hello netanel 

     

    you are almost there. Just replace the changed type at the very end of your code with Reverse. Be aware, its case sensitive...

     

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy

7 Replies

  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello netanel 

     

    you can transform you column (you could basically also add a custom column, but that would only make more unneccessary data) and apply the function in my code

        Reverse = Table.TransformColumns
        (
            #"Changed Type",
            {
                {
                    "YourColumn",
                    each Text.Combine(List.Reverse(Text.ToList(_))), 
                    type text
                }
            }
        )

    if you need more columns to be transformed, you have to add a another nested list. In case I can show you that too. Here a complete code example to see how it works

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckxKVkhJTbNXitWJVvLPSFSoSElUio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [YourColumn = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"YourColumn", type text}}),
        Reverse = Table.TransformColumns
        (
            #"Changed Type",
            {
                {
                    "YourColumn",
                    each Text.Combine(List.Reverse(Text.ToList(_))), 
                    type text
                }
            }
        )
    in
        Reverse

    transforms this

     

    into this


    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy