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
LeahS
Frequent Visitor

Relationships with Column Names

I'm new to Power BI.  I'm trying to create a relationship between my tables of client information and the data itself for filtering.  Right now in my data tables, the client name is the column name.  I would like to match this to a value in the "client" column of my client information table, but can't seem to figure out how.  Do any of you have any ideas on how to work around this issue?

 

Example

"Le St", a value in the "Clients" column of client information table

In Level 1 Table, "Le St" is a column name with rows being dates.  So each row has how many level 1's "Le St" had on that date.

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @LeahS ,

 

To create a relationship between your client information table and the Level 1 table, you'll need to unpivot the Level 1 table so that the client names become values in a single column instead of being column names.


Go to the Data view->Select the Level 1 table->In the Home tab, click on Transform Data to open the Power Query Editor->In the Power Query Editor, select all columns except the date column->Right-click on one of the selected columns and choose Unpivot Columns->Rename the generated Attribute column to "Clients" and the Value column to something meaningful, like "Level 1 Count"->Click Close & Apply to apply the changes

Now, you should have a transformed Level 1 table with a "Clients" column that can be used to create a relationship with the client information table. To create the relationship:


Go to the Model view->Drag the "Clients" column from the Level 1 table to the "Clients" column in the client information table->Power BI will automatically create a relationship between the two tables.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
LeahS
Frequent Visitor

Thanks Neeko!  That worked for me.  The relationships are all functioning now.  I appreciate the help!

Anonymous
Not applicable

Hi @LeahS ,

 

To create a relationship between your client information table and the Level 1 table, you'll need to unpivot the Level 1 table so that the client names become values in a single column instead of being column names.


Go to the Data view->Select the Level 1 table->In the Home tab, click on Transform Data to open the Power Query Editor->In the Power Query Editor, select all columns except the date column->Right-click on one of the selected columns and choose Unpivot Columns->Rename the generated Attribute column to "Clients" and the Value column to something meaningful, like "Level 1 Count"->Click Close & Apply to apply the changes

Now, you should have a transformed Level 1 table with a "Clients" column that can be used to create a relationship with the client information table. To create the relationship:


Go to the Model view->Drag the "Clients" column from the Level 1 table to the "Clients" column in the client information table->Power BI will automatically create a relationship between the two tables.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

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.