This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi Everyone !
I have been trying to pivot the below data by wrt to Account_L2 and Values.
There are around 5 million such rows
But it is taking a hell lot of time and finally crashing my power BI.
The source is Dataflow.
Please help
| Month | Year | ZONE 1 | ZONE 2 | CLUSTER 1 | CLUSTER 2 | CLUSTER 3 | CLUSTER 4 | COUNTRY | FDT Cluster | NBM Countries | Franchise | Franchise#2 | Division#1 | Division#2 | PRODUCT FAMILY | PRODUCT | MAIN PRODUCT | EXT - SEGMENT | EXT - ASSET TYPE | EXT - PRODUCT FAMILY NEW | INT - SEGMENT | INT - ASSET TYPE | INT - PRODUCT FAMILY NEW | MARKET#1 | MARKET#2 | Other information #1 | Other information #2 | Account_L2 | INT - FDT SEGMENT | Rates | ATT_DIV | ATT_EnActivite | MC Code | Account Code | Product Code | Extracted Rates | Attribute | Value |
| Dec | 2021 | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GROSS MARGIN | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | 713000 | |
| Dec | 2021 | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GROSS MARGIN | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | -713000 | |
| Dec | 2021 | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GROSS MARGIN | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | 0 | |
| Dec | 2021 | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GROSS MARGIN | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | GENERAL MEDICINES | 0 |
Solved! Go to Solution.
Hi @Gopal2704 ,
Pivot/Unpivot are 'whole-table' operations i.e. Power Query must load the ENTIRE table into memory in order to perform the transformation.
For such large tables, you have a few options:
-1- Don't perform the pivot at all and see if it's possible to use the data in its native state e.g. by using matrix visuals etc.
-2- Perform the pivot operation at source e.g. write a view on the server that pivots the data before being brought in to Dataflow/Power Query.
-3- Use the original source (SQL Server etc.) as your query source (instead of a Dataflow) and utilise query folding to perform the operation at source.
-4- Break up/filter your table into much smaller pieces before performing the pivot/unpivot.
-5- Invest in RAM to go into your gateways/desktop/laptop, cranking them all up to 48GB-64GB+.
You may also find performance improvements by doing the pivot in DAX, although this will likely also be highly dependent on machine RAM availability as well.
Pete
Proud to be a Datanaut!
Hi @Gopal2704 ,
Pivot/Unpivot are 'whole-table' operations i.e. Power Query must load the ENTIRE table into memory in order to perform the transformation.
For such large tables, you have a few options:
-1- Don't perform the pivot at all and see if it's possible to use the data in its native state e.g. by using matrix visuals etc.
-2- Perform the pivot operation at source e.g. write a view on the server that pivots the data before being brought in to Dataflow/Power Query.
-3- Use the original source (SQL Server etc.) as your query source (instead of a Dataflow) and utilise query folding to perform the operation at source.
-4- Break up/filter your table into much smaller pieces before performing the pivot/unpivot.
-5- Invest in RAM to go into your gateways/desktop/laptop, cranking them all up to 48GB-64GB+.
You may also find performance improvements by doing the pivot in DAX, although this will likely also be highly dependent on machine RAM availability as well.
Pete
Proud to be a Datanaut!
Thank you for providing a detailed solution Pete !!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.