Forum Discussion

DOL51's avatar
DOL51
Frequent Visitor
10 years ago
Solved

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...
  • greggyb's avatar
    10 years ago

    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.