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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
RaideR
New Member

Create new table with custom column name

Hey guys,

I feel this is a very basic question. 

So I have this expression which creates a new table and which works fine:

Helper Summary Table = 
{
    (
        SELECTCOLUMNS(TOPN(1, r_fs, r_fs[date_created], DESC), "country_value", [country_1_value]),
        SELECTCOLUMNS(TOPN(1, r_fs, r_fs[date_created], DESC), "country_name", [country_1_name]) 
    ),
    (
        SELECTCOLUMNS(TOPN(1, r_fs, r_fs[date_created], DESC), "country_value", [country_2_value]),
        SELECTCOLUMNS(TOPN(1, r_fs, r_fs[date_created], DESC), "country_name", [country_2_name]) 
    ),
}


The resulting output is a table with the right format - i.e. two columns "Value1" and "Value2" with two data rows. 

How can I rename the "Value1" and "Value2" fields to a custom name?

1 ACCEPTED SOLUTION
RaideR
New Member

...

Alright - I just renamed the columns via the "Fields" tab. Previously, I looked into a programmatically solution.

View solution in original post

1 REPLY 1
RaideR
New Member

...

Alright - I just renamed the columns via the "Fields" tab. Previously, I looked into a programmatically solution.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.