Forum Discussion
Relationships with Column Names
- Anonymous3 years ago
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 changesNow, 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.
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.