Forum Discussion
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
| FirstName | LastName | Q1 | Q2 |
| AA | BB | 1 | 3 |
| CC | DD | 5 | 7 |
to Table2
| FirstName | LastName | Quarter | Value |
| AA | BB | Q1 | 1 |
| CC | DD | Q2 | 3 |
| AA | BB | Q1 | 5 |
| CC | DD | Q2 | 7 |
Thank you
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
- parry2kSuper User
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.
- AnonymousNot 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
- parry2kSuper 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.