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
DOL51
Frequent Visitor

MISSING FIELDS

Hi to you all, I have just joined in and this is my first ever post somewhere. I have been using PowerBi for some days now and I have been facing this isssue below from time to time.

 

From time to time, Existing fields do not show in the formula bar and writting them is not accepted and return an error message.

This already happened to me with another file and got solved by magic as far as I remember.

 

the error message is 'Failed to resolve name 'EURO_VALUE'. It is not a valid table, variable, or function name.'

 

Thanks in advance for hints, tricks and help.

 

DOL51

 

Capture.PNG

1 ACCEPTED SOLUTION
greggyb
Resident Rockstar
Resident Rockstar

You're referring to the [EURO_VALUE] column in a measure. This means there's no context in which to determine which row's value of [EURO_VALUE] should be returned. A measure must return a scalar - this means that the evaluation of the function(s) therein must return a scalar value. [EURO_VALUE] is an entire column. A column is many separate values.

 

Wrapping your column in an aggregate function will make the measure functional, e.g.:

Total Euro Value =
SUM( 'ShipmentCost'[EURO_VALUE] )

As a note for you, it is considered a best practice to always use fully qualified column references: '<table name>'[<field name>], and unqualified measure references: [<measure>].

 

When you are adding a calculated column, that column definition is evaluated in a row context based on its parent table. In a row context, a column reference makes sense, because a column has only one distinct value in a given row context, so its value is scalar.

View solution in original post

3 REPLIES 3
greggyb
Resident Rockstar
Resident Rockstar

You're referring to the [EURO_VALUE] column in a measure. This means there's no context in which to determine which row's value of [EURO_VALUE] should be returned. A measure must return a scalar - this means that the evaluation of the function(s) therein must return a scalar value. [EURO_VALUE] is an entire column. A column is many separate values.

 

Wrapping your column in an aggregate function will make the measure functional, e.g.:

Total Euro Value =
SUM( 'ShipmentCost'[EURO_VALUE] )

As a note for you, it is considered a best practice to always use fully qualified column references: '<table name>'[<field name>], and unqualified measure references: [<measure>].

 

When you are adding a calculated column, that column definition is evaluated in a row context based on its parent table. In a row context, a column reference makes sense, because a column has only one distinct value in a given row context, so its value is scalar.

DOL51
Frequent Visitor

thank you for this clear answer and tip regarding naming conventions. This indeed solved my issue.

greggyb
Resident Rockstar
Resident Rockstar

The Intellisense in the DAX editor has gotten a good amount of work, and I find that it keeps up with me even in very complex measures. If what you're writing doesn't have an auto-complete option, it's quite likely that it is not valid DAX.

 

Any error you see, though, like the one in your screenshot, are not generated by the Intellisense engine, but the Tabular model in the .pbix file itself. If you see an error after finishing a measure or a column definition, that means that the statement truly is invalid and could never return data as written.

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.