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.

Intellisense Still not quite right

I thought I created this ticket last week, but I don't see it anywhere.  It also seems there is no way to see "My Issues" in this bug forum like you can in the Ideas forum.

 

When a user types a formula using the following keystrokes, the intellisense correctly follows best pratice (AdventureWorks Example)

 

measure =SUM(exten

 

After typing the above, Intellisense correctly presents the column Sales[ExtendedAmount] and completes the following formula

=SUM(Sales[ExtendedAmount]) including the table name.

 

If however the user types the following keystrokes

 

measure = SUM([exten

 

Not the addition of a square bracked after the sum.  The Column is then presented without the table name and the final formula delivered is

 

=SUM([ExtendedAmount]).  This is not best practice and Intellisense should be changed to first present the table name, and second to add the table name in the formula.

 

 

Status: New
Comments
MattAllington
MVP

I have noticed the Intellisense has been signficantly improved over the last few months - it now follows best practice naming conversions much more consistently.  I was delivering training yestday and noticed a bug (at least a usability/best practice issue).

 

To reproduce

  1. Create a new Measure
  2. Type =SUM(
  3. Press open square bracket [
  4. Intellisense will provide you a list of column names without the table names pre-pended
  5. When you select a column, the column is added to the measure without the table name.

Expected result

step 4.  Provide a list of the column names with the table names pre-pended

step 5.  Select the column name with the table name pre-pended.

 

I hope you agree this should be fixed.

v-qiuyu-msft
Community Support

Hi @MattAllington,

 

I have sent a email to consult this issue from PG team internally, will update here once I get any information. 

 

Best Regards,
Qiuyun Yu

v-qiuyu-msft
Community Support

Hi @MattAllington,

 

I got information internally that is by design. 

 

Best Regards,
Qiuyun Yu

MattAllington
MVP

Now I realise why I couldn't find this post in the Issues section - I put it in the wrong place. Here is the bug I just created

 

https://community.powerbi.com/t5/Issues/Intellisense-Still-not-quite-right/idi-p/311882/jump-to/firs...

 

 

Regarding the "by design" comment, that may or may not be correct.  But regardless how it was designed, it is definitely not the way is should work.  Can you please check with Will Thompson and see if he agrees that the current design needs to change.

v-qiuyu-msft
Community Support

Hi @MattAllington,

 

I confirm this from Power BI desktop PG team. You can see below information. 

 

Yes, it’s by design. Our intellisense allows both fully qualified column name and column name without accompanying table name since we think both styles are useful. The user thinks it’s a bug because they want intellisense to only suggest fully qualified column name, never suggests unqualified version even though it’s syntactically valid.

 

Best Regards,
Qiuyun Yu

MattAllington
MVP

Thanks for the further follow up.  The developers may not be aware that best practice is to always use the table name in front of the column name.  A DAX formula should never refer to a column name without a table name.  There are 2 reasons.

1. It is possible to have 2 columns in 2 different tables with the same column name.  If the column name is not qualified with the table name, which one will be used?  How will the software and/or the user know which is being used?

2. There is very different behaviour between a measure and a column when inside a row context (eg context Transition or no context transition).  Even though there is intellisense colour coding for measures, this colour coding is not transferred into documentation etc.  The table name in front of the column name makes it clear if the reference is to a column or a measure.

 

For these 2 reasons, a column should never be referred to without a table name in a DAX formula.  The software intellisense should support this and it will help beginners get the correct syntax the first time.  

 

I have spoken to Will Thompson about this and I believe he will follow up with the developers.  I would appreicate if you would pass this on.

 

 

v-qiuyu-msft
Community Support

Hi @MattAllington,

 

I have delivered this concern internally, will update here once I get any information. 

 

Best Regards,
Qiuyun Yu

v-qiuyu-msft
Community Support

Hi @MattAllington,

 

Please refer to below information: 

 

As I said, we don’t believe calculated columns, RLS, measure should share the same conventions.

 

Unless you have nested table iterators, which is not the most common case, there is no ambiguity in which column is being referenced. For example, a user who wants to create a simple calculated column YEAR([Date]), there is really no need to prepend the column name with the table name as there is no ambiguity at all. I would argue that for most basic calculated column and RLS expressions, there is no need to prepend a table name. Another very common case is a single table model, it would be very annoying to force the intellisense to prepend every column reference with the only table name. Marco Russo’s suggestion is for complex models and mostly for measure expressions, but our intellisense has to work for all types of models and expressions. 

 

Best Regards,
Qiuyun Yu