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.
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?
Solved! Go to 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
@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
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |