Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Transpose table

Hi All,

 

Is it possible in Power BI "not via power query unpivot" to transform the below table to the other format

 

Table1

FirstNameLastNameQ1Q2
AABB13
CCDD57

 

to Table2

FirstNameLastNameQuarterValue
AABBQ11
CCDDQ23
AABBQ15
CCDDQ2

7

 

Thank you

  • parry2k's avatar
    parry2k
    7 years ago

    Anonymous yes doing with DAX using summarize not a bad option but why not use power query when it has in-built function to do the job. 

     

    Doing wiht power query will have better compression and performance in vertipaq enqine but that all depends on how big is your dataset?

     

    Anyhow I will leave that decision with you, you have both the choices. You can do performance test to figure out what works best.

     

     

4 Replies

  • Anonymous I don;t think so, it is better to unpivot data in Power Query then you can use pivot or unpivot in desktop using matrix or table visual.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you parry2k 

       

      What about using summarize with VAR to create two tables with new additional columns "Quarter" and "Value"

      Then using UNION to combine the 2 tables.

      I managed to get this done and works perfect.

      Not sure what will happen if the source table will get more data into it

      • parry2k's avatar
        parry2k
        Super User

        Anonymous yes doing with DAX using summarize not a bad option but why not use power query when it has in-built function to do the job. 

         

        Doing wiht power query will have better compression and performance in vertipaq enqine but that all depends on how big is your dataset?

         

        Anyhow I will leave that decision with you, you have both the choices. You can do performance test to figure out what works best.