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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sivasrao
Helper III
Helper III

Rename the column headers in new table

Hi,

As all of you know the creation of a new table by using the DAX function. 

It's like 

Table = {("first name", "second name")}
we will get a new table with column headers as "value1" and "value2".
 
value1value2
first namesecond name

I want to rename the "value1" column header to some other name related to tabel data. I have used many ways but can't able to rename the column header. 

How can I rename the column headers?

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @sivasrao 

 

try to create a table with this:

Table =
DATATABLE(
    "FirstName", STRING,
    "SecondName", STRING,
    {
        {"Michael", "Johnson"},
        {"Michael", "Jordan"},        
        {"Michael", "Phelps"}
    }
)
 
I tried and it worked like this:
FreemanZ_0-1671009591729.png

 

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @sivasrao 

 

try to create a table with this:

Table =
DATATABLE(
    "FirstName", STRING,
    "SecondName", STRING,
    {
        {"Michael", "Johnson"},
        {"Michael", "Jordan"},        
        {"Michael", "Phelps"}
    }
)
 
I tried and it worked like this:
FreemanZ_0-1671009591729.png

 

Thank you for your quick reply.

But, is there any chance or other option to rename those column headers?

try not to do that with DAX. try to do it in datasource.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.