Forum Discussion

Jalal_1988's avatar
Jalal_1988
Brass Contributor
Dec 23, 2023

Remov Reapeat and Transpse Data

Hello my friends

 

I want in power query to remove the repeated rows and transpose the invoices like  i showed in excel file , 

 

 

thank you fry your help

  • Jalal_1988 I trust you have a good reason for wanting to do this, since the data is already very well structured as it is. One would normally want to go from the 'transposed' data towards data in a tabular form. But that's your choice.

    See attached.

  • peiyezhu's avatar
    peiyezhu
    Bronze Contributor

    Jalal_1988 

    sql:

    //select * from basic_group_concat limit 20;
    select row_number() over () NO,CODE,NAME,group_concat(INVOCIE,'</td><td>') INVOCIE from basic_group_concat group by CODE,NAME

     

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Jalal_1988 I trust you have a good reason for wanting to do this, since the data is already very well structured as it is. One would normally want to go from the 'transposed' data towards data in a tabular form. But that's your choice.

    See attached.

    • Jalal_1988's avatar
      Jalal_1988
      Brass Contributor
      Dear fiend is there any other easy solution for that ?

      tnx
      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        Jalal_1988 What do you mean? You ask for a PQ solution. You get one that is very basic. What other 'easy' solution do you want?

Resources