cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CVest Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Which column names are best?

@CVest ,

 

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
Gordonlilj Established Member
Established Member

Re: Which column names are best?

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

Community Support Team
Community Support Team

Re: Which column names are best?

@CVest ,

 

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

CVest Frequent Visitor
Frequent Visitor

Re: Which column names are best?

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.

Community Support Team
Community Support Team

Re: Which column names are best?

@CVest ,

 

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

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,764)