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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Which column names are best?

Hi all

 

I wonder what is the best way to make column names in Power BI. Is it a good idea to include the table name in the column name? For instnace, I have a table named "Invoice", with columns such as "Date" and "Amount". I also have another table named "Order", which also has columns named "Date" and "Amount".

 

When I write DAX I can always see the names of the table, like Invoice [Date] and Order [Date]. However, in visuals I only get the column names. So when it says just "Date", it's hard for the user to see wether it's the invoice date or the order date.

 

Is it a good idea to rename all columns to also include the table name? Like Invoice [InvoiceAmount] and Order [OrderAmount]? What is best practice for naming columns?

1 ACCEPTED SOLUTION

@Anonymous ,

 

In this senario, you'd better not to change the column name, because your requirement is to compare values between the two tables so I think you may use some dax function like LOOKUPVALUE() or RELATED() which need the relationship.

 

Regards,

Jimmy Tao

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

It depends on your requirement. If the two tables 'Invoice' and 'Order' doesn't have relationship with each other, you'd better rename the "same" column names with different column names. However, if they are using the same data source and you need to build relationship with the two tables, I would suggest you not to change the column names because you need to use the same columns to filter other table.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

They are from the same data Source and it is a relationship between them. We need to be able to compare ordered amount With invoice amount.

@Anonymous ,

 

In this senario, you'd better not to change the column name, because your requirement is to compare values between the two tables so I think you may use some dax function like LOOKUPVALUE() or RELATED() which need the relationship.

 

Regards,

Jimmy Tao

Gordonlilj
Solution Sage
Solution Sage

https://www.sqlbi.com/articles/data-import-best-practices-in-power-bi/  Here you could read about some best practices for data imports including such things as naming columns

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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