Forum Discussion

gauravnarchal's avatar
gauravnarchal
Post Prodigy
4 years ago
Solved

Rearrange data table

Hello

 

How can I arrange my data from

 

Description2220583580380104
NI POS SETT 260222 200000812- 9806.23233.1211.65-10051.009806.23
NI POS SETT 270222 200000812- 10171.66234.6011.74-10418.0010171.66

 

to below

 

Account Description Amount
22205NI POS SETT 260222 200000812- 9806.23233.12
835NI POS SETT 260222 200000812- 9806.2311.65
803NI POS SETT 260222 200000812- 9806.23-10051.00
80104NI POS SETT 260222 200000812- 9806.239806.23
22205NI POS SETT 270222 200000812- 10171.66234.60
835NI POS SETT 270222 200000812- 10171.6611.74
803NI POS SETT 270222 200000812- 10171.66-10418.00
80104NI POS SETT 270222 200000812- 10171.6610171.66

 

 

  • Hi gauravnarchal ,

     

    You can achive this simple in Power Query Editor in Power BI Desktop, by following the steps below:

    This is the source data that you shared:

    Now select your Description column --> under Transform --> select Unpivot Columns --> Unpivot other columns as shown below:

    Onec you do this transformation, you will get the following:

    This is nearly the required result you need.

    Rename Attribute to Account and Value to Amount column names by right-clicking on the respective columns. This will give you the following:

    Now just hold the Description column and drag it to the right, to get the expected output:

    This is the desired result. Hope this helps.

     

7 Replies

  • Hi gauravnarchal ,

     

    You can achive this simple in Power Query Editor in Power BI Desktop, by following the steps below:

    This is the source data that you shared:

    Now select your Description column --> under Transform --> select Unpivot Columns --> Unpivot other columns as shown below:

    Onec you do this transformation, you will get the following:

    This is nearly the required result you need.

    Rename Attribute to Account and Value to Amount column names by right-clicking on the respective columns. This will give you the following:

    Now just hold the Description column and drag it to the right, to get the expected output:

    This is the desired result. Hope this helps.

     

      • Pragati11's avatar
        Pragati11
        Super User

        HI gauravnarchal ,

         

        If the solution helped, appreciate a kudos and do accept it as a solution to this thread so that others can benefit from it on the forum.