Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Expressions that yield variant data-type cannot be used to define calculated columns.

Getting this error while trying to create a calculated column with values from another column that are all formatted as Whole Numbers.   Quartile Rank = CALCULATE(PERCENTILE.INC(ProjectAuditsDB[Wa...
  • TomMartens's avatar
    7 years ago

    Hey,

     

    I'm not sure what exactly is going on, but as I change the data type (not just format) of the column to decimal number, it seems to work, at least in my simple table.

     

    Hm, I'm wondering why you use CALCULATE(...), this creates a context transition meaning, transforming the exsisting row context (the current row, as you are creating a calculated column) into a filter context. Basically each column value of your table will act as a filter value. This means, if your table contains a row identifier, just one row is used to calculate PERCENTILE.INC.

     

    Regards,
    Tom