Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Translate Table

Hello everyone,
I would have this problem. I have a table like below

but I would like to transform it this way.

 

Is there anyone who knows a way with Sql or with Power Bi desktop?
Thank you all

 

2 Replies

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, Anonymous 

     

    Considering that it is best not to duplicate the name between the columns, otherwise it will be integrated. I create a calculated column to display, then you can show it in matrix.

    Like this:

    Column =
    VAR ranka =
        RANKX (
            FILTER (
                'Table',
                [Column1] = EARLIER ( 'Table'[Column1] )
                    && [Column3] = EARLIER ( 'Table'[Column3] )
            ),
            [Column2],
            ,
            ASC
        )
    RETURN
        CONCATENATE ( [Column3], ranka )
    

     

    Best Regards

    Janey Guo

     

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