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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Veles
Advocate V
Advocate V

Should you always fully qualify column references?

Hi,

 

Found it difficult to find an answer on this one.

 

While using Power BI I notice that when making a DAX formula, if you use the little helper box it will always fully qualify your column references, even when you're referring to a column in the same table.

 

I've also noticed that Power Pivot doesn't do this.

 

Is there any particular reason why I should or shouldn't fully qualify a column reference where you're referring to a column in the same table?

 

Thanks

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Veles,

 

You can see from this article:

 

This is known as a fully qualified column name in that it includes the column name preceded by the table name. Columns referenced in the same table do not require the table name be included in the formula. This can make long formulas that reference many columns shorter and easier to read. However, it's good practice to  include the table name in your measure formulas, even when in the same table. > Note: If a table name contains spaces, reserved keywords, or disallowed characters, you’ll need to  enclose the table name in single quotation marks. You’ll also need to enclose table names in quotation marks if the name contains any characters outside the ANSI alphanumeric character range, regardless of whether your locale supports the character set or not.

 

Also you can go through this article to see a fully qualified name is always required when you reference a column in the following contexts:

  • As an argument to the function, VALUES

  • As an argument to the functions, ALL or ALLEXCEPT

  • In a filter argument for the functions, CALCULATE or CALCULATETABLE

  • As an argument to the function, RELATEDTABLE

  • As an argument to any time intelligence function

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Veles,

 

You can see from this article:

 

This is known as a fully qualified column name in that it includes the column name preceded by the table name. Columns referenced in the same table do not require the table name be included in the formula. This can make long formulas that reference many columns shorter and easier to read. However, it's good practice to  include the table name in your measure formulas, even when in the same table. > Note: If a table name contains spaces, reserved keywords, or disallowed characters, you’ll need to  enclose the table name in single quotation marks. You’ll also need to enclose table names in quotation marks if the name contains any characters outside the ANSI alphanumeric character range, regardless of whether your locale supports the character set or not.

 

Also you can go through this article to see a fully qualified name is always required when you reference a column in the following contexts:

  • As an argument to the function, VALUES

  • As an argument to the functions, ALL or ALLEXCEPT

  • In a filter argument for the functions, CALCULATE or CALCULATETABLE

  • As an argument to the function, RELATEDTABLE

  • As an argument to any time intelligence function

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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