Skip to main content
Microsoft Idea

Power BI

Needs Votes

IntelliSense Should Use Best Practice Column and Measure Naming Conventions

Vote (420) Share
Matt Allington's profile image

Matt Allington on 28 Mar 2018 05:28:03

There is a clearly defined and accepted best practice for referencing columns and measures in the DAX language.

1. Column names should ALWAYS reference the table name.
TableName[Column Name]
2. Measures should NEVER reference the table name.
[Measure Name]

This is a fundamental concept accepted by everyone with knowledge of the DAX language (everyone I know anyway).

IntelliSense in DAX sometimes follows this convention and sometimes it does not. I have created a short video (40 seconds) showing 3 examples. https://youtu.be/CvaRhKrnHRk

There are other places where column names are appended to measure names too, such as inside Quick Measures, and I have also seen Column Names used without pre-pending the table name.

Microsoft...
Please acknowledge that this is an issue, and
Please fix IntelliSense so it always follows the best practice

Comments (9)
Matt Allington's profile image Profile Picture

Andreu fil on 19 Apr 2024 10:07:33

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

Good information, thankssehackear.top

Matt Allington's profile image Profile Picture

elias zafrani on 19 Apr 2024 00:04:19

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

ThanksHackear Instagram Hackear WhatsApp Hackear Facebook

Matt Allington's profile image Profile Picture

Kenneth Barber on 22 May 2023 20:01:53

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

I think that it helps to explain why the convention is the way that it is. A measure just describes a calculation, so it intuitively should not matter in which table it resides, and so the table name is not even important unless the measure has the same name as a column or measure in another table. Columns are an intrinsic part of a table, so it is pretty important to know to which table a column belongs.To add to the suggestion, I feel that the table names used by IntelliSense should always be surrounded by single quotes (e.g. 'Table Name'), even if the table name does not contain spaces. I find it mentally easier to accept the single quotes as part of the syntax for table names rather than keep track of 2 syntaxes. Also, having single quotes around the table name is good for tables that share the same name with functions (e.g. Date, Time). This will prevent confusion with syntax highlighting and IntelliSense.

Matt Allington's profile image Profile Picture

Lin B on 10 Aug 2022 23:29:52

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

Thanks for this Matt - I'm on your email list so it was a great prompt / call to action! I'll ask my colleagues to support it too,

Matt Allington's profile image Profile Picture

Jaap Olsthoorn on 10 Aug 2022 09:43:33

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

Wow yeah, I was hoping someone made an idea for this. Its driving me nuts. It's so random whether it uses the fully qualified measure names or not. Never ever do I want this PowerBI!Really bad when intellisense is teaching you to write poor DAX :(

Matt Allington's profile image Profile Picture

Power BI User on 05 Jul 2020 23:17:58

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

Also make naming conventions in power query without spaces so the inverted commas and hash aren't need.

Matt Allington's profile image Profile Picture

Robert Cline on 05 Jul 2020 23:16:35

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

This is an issue. I hope Microsoft will address and fix this issue!! Thank you.

Matt Allington's profile image Profile Picture

Koen Verbeeck on 05 Jul 2020 23:16:33

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

If this isn't implemented, we'll send all Power BI employees the YouTube video of Marco Russo jumping up and down screaming measures can't have table names. Every day.

Matt Allington's profile image Profile Picture

fabiaN odU on 05 Jul 2020 23:16:28

RE: IntelliSense Should Use Best Practice Column and Measure Naming Conventions

I am with you on this.