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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Yrstruly2021
Helper V
Helper V

Manuael Column Labeling

Can i make a copy of  Label column and name the two columns as "App Category" and "Menu" instead of running the following SQL?

# App Filter Categories
select a.label as 'App Category'
, b.label as 'Menu'
, c.product_uid as 'Product UID'
from app_menu_filters a
left join app_menu_filters b on b.parent_uid=a.uid
left join app_menu_filter_products c on b.uid=c.app_menu_filter_uid
where a.status='A' and a.level=1
order by 1,2,3;

See: https://drive.google.com/file/d/1Bb_UPIws52ZcY_SpcsLXcEJMdZfp5t7k/view?usp=sharing 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Yrstruly2021 ,

 

So you have two tables both have label column and you want to merge these two tables and keep two lable columns with different names?

If so, it is more convenient to do this work in sql. If you want to do this in Power BI, you need to load these two tables, then use the Merge Queries feature to merge the two tables as one, as last rename the two label columns.

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Yrstruly2021 ,

 

So you have two tables both have label column and you want to merge these two tables and keep two lable columns with different names?

If so, it is more convenient to do this work in sql. If you want to do this in Power BI, you need to load these two tables, then use the Merge Queries feature to merge the two tables as one, as last rename the two label columns.

 

Best Regards,

Jay

Yrstruly2021
Helper V
Helper V

Thank you. I just cant seem to figure out where is the two categories drawn from when i manually search for it in my dataset: https://drive.google.com/file/d/1zqSbAvESHf5WUw4U-OKXjL_9E8NbJTfd/view?usp=sharing ? 

amitchandak
Super User
Super User

@Yrstruly2021 ,Issue is not clear

 

depending on database  rename should be in double quotes or []

 

example

select a.label as "App Category" -- or [App Category]
, b.label as Menu
, c.product_uid as ProductUID
from app_menu_filters a
left join app_menu_filters b on b.parent_uid=a.uid
left join app_menu_filter_products c on b.uid=c.app_menu_filter_uid
where a.status='A' and a.level=1
order by 1,2,3;

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.