Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Solved! Go to Solution.
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.
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.
thank you for this clear answer and tip regarding naming conventions. This indeed solved my issue.
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.
User | Count |
---|---|
139 | |
113 | |
104 | |
77 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |