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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.