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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
shavish
Helper I
Helper I

Solution for Power BI direct query for Merging columns.

I want to display my table like following (Data is an Example):

 

shavish_0-1744766633509.png

 

Where the Employer and Category need to be shown as merged coloumn. But in actual database every Name,ID and Address has Employer and Category and my requirement is to show them as one value instead of same value for each entry. Actual table from Database would look like for example:

shavish_0-1744766819701.png

 



The table will be retrieved from SQL server through the DIRECT QUERY. The parameters to select options will be passed as Dynamic parameter, so when a New employer gets selected the respective values corresponding from database will be shown on Power BI. If anyone can offer a solution for my problem it would be helpful. 

1 ACCEPTED SOLUTION
HarishKM
Memorable Member
Memorable Member

@shavish Hey,
I will recommend write something like below 

 

SELECT
CONCAT(Employer, ' - ', Category) AS Employer_Category,
Name,
ID,
Address
FROM
your_table
ORDER BY
Employer, Category;

 

then you update this here in Power query

HarishKM_0-1744804371884.png

 

 

Thanks
Harish M
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query

View solution in original post

7 REPLIES 7
v-sdhruv
Community Support
Community Support

Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @shavish ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @shavish ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

HarishKM
Memorable Member
Memorable Member

@shavish Hey,
I will recommend write something like below 

 

SELECT
CONCAT(Employer, ' - ', Category) AS Employer_Category,
Name,
ID,
Address
FROM
your_table
ORDER BY
Employer, Category;

 

then you update this here in Power query

HarishKM_0-1744804371884.png

 

 

Thanks
Harish M
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query

lbendlin
Super User
Super User

Create a view in your SQL Server database and connect to that view instead.

Can you clarify in detail about your solution? I couldn't understand it yet. 

Do your required merge/join at the data source, in SQL server.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors