Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
acerNZ
Helper III
Helper III

Transpose of table doesn't work.. Says too large data.

2020-10-10_14h15_13.pngHi Experts

Situation: I have about 60,000+ IDs and I have one of these tables, with each of these IDs in rows repeated about 30 times as key and values. 

Objective: To make into columns ID and corresponding 30+ Key and value columns ( unfortunately, they are not ordered, though most of the keys are same)

What I planed is 

Step 1: Transpose entire table,

Step 2: I  delete duplicate columns

Result will be one ID per Row, with about 30+ Keys and values columns

Step 3: Then I move all the duplicate keys as column headers (per each ID)

Step 4: Then I want to move Values under the key column headers, corresponding to each key 

Step 4: Delete unwanted key columns  

 

Question: I am not sure how to accomplish this from step 3 but

2. I hit a road block on step 1, Power BI is complaining about transpose table saying "The type of the current preview value is too complex to display.. 😞

 

Please can you help me 1. If my approach is right ? If right or wrong, please can you share best way forward 

2. How to do it? and any reference link would be appreciated.

 

Thanks in advance

6 REPLIES 6
PijushRoy
Super User
Super User

Please share data or sample data

@PijushRoy Thanks a lot.

I have created a small sample size with some issues as I see, but this data I run has more than 180000 rows, causing transpose to fail.

1. I am thinking (subject to your advice, to have the data name and Data value (Col B & C) in coloumns
2. Data format should be Asia (DD/MM/YYYY)
3. Please note that each ID has different set of Keys and values
4. This type of data runs in about 180000+ rows with IDs more than 60,000 unique IDs which are repeated with multiple values.

 

PLease advice

ID numberData KeyData Value
1Hire date23/05/2010
1GenderM
1DOB 
1Phone12121232338
1Phone2123122243
1ApprovedYes
1CostUSD 2300
2Hire dateMay 1 2018
2GenderF
2DOB04/22/1977
2Phone11234567890
2Phone24987654321
2ApprovedYes
2CostUSD 1400
2PositionStaff mgr
2LocationBoulder
2reports toGeorge Naunce
2Employee typeContract
3Hire date4th Mar 2016
3DeptQuality
3CostUSD 1500
4Hire dateMar 6th 2018
4GenderMale
4DOB08/26/1979
4Phone1-
4Phone2-
4ApprovedNo
4CostUSD 5000
4PositionSales head
4LocationDenver
4reports to 
4Employee typeFull Time
4Vehicle allowanceYes

Hi acerNZ

 

Do you want to show your data like below?

 

power query transposepower query transpose

 

want to show data in POWER BI visualization or want to make it in POWER QUERY?

 

Hi @PijushRoy 

That is perfect but couple of things 

1. Date format has to DD/MM/YYYY

2. What is the best practices in Power BI / Data.. to have blanks on empty fields are fill it with null?

 

 

Thanks a lot

Please find the project file and try it.

Change the source file.

I am trying to sort out the date format requirement and let you know.

If my answer solves your requirements, mark as SOLUTION.

 

Find the pbix file - https://drive.google.com/file/d/1cZ4fRc957rS8jQghU7nJMGc3Onm9hqN-/view?usp=sharing

 

 

Thank you @PijushRoy  I will wait for Date stuff and executed your solution and I got the concept. When re-doing it, I have some issues may be I create seperate thread.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors