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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kathyo1234
New Member

Import a SQL table multiple times

Hi,

 

I'm experimenting with PowerBI on desktop in terms of capability.

 

Our database is a heavily customised CRM where many of our fields are held in a CustomParameter table but in front end, they display on different Tabs. Data on the table is stored where the parameterName is a field in the table e.g.

 

RecordID   ParameterName     ParameterLabel     Parameter Type    Field1

0001          FatherDetails          Name                     Text                       John Doe

0002          FatherDetails          DateOfBirth            Date                      01-01-1930

0003          WorkHistory            JobDescription       Text                       Air Traffic Controller

0004           WorkHistory           StartDate                Date                      01-01-1990

0005          WorkHistory            EndDate                 Date                      31-12-1990

 

If including this data in normal SQL queries, I just load the table multiple times as if they are different tables to bring in FatherDetails, WorkHistory etc

 

I tried importing this in PowerBI but I seem to hit a wall when I merge fields as I can't seem to transpose part of the table to bring the labels up to be field headers. 

 

Any suggestions on how to achieve this?

Kathy

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@kathyo1234

 

Normally there should exist a unique identifier in this table,  otherwise there's no way to determine the belonging when there exists more duplicated fatherdetail names. Supposing the identifier in this case is a interger, if you'are requiring a transformation as below, you can follow the listed step.
1.PNG

 

  1. Remove the columns RecordID,ParameterName,[Parameter Type]
  2. Click "PIVOT" with the column ParameterLabel selected and the option as below.
    2333333.PNG
  3. Click OK.

 

If you have any question, feel free to let me know.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.