Forum Discussion

Ffitzpatrick47's avatar
8 years ago
Solved

count rows vs has one value

Is there an update to this? https://powerpivotpro.com/2011/03/the-magic-of-ifvalues/    =IF(COUNTROWS(VALUES( <Your Column Here> ))=1,          IF(VALUES( <Your Column Here> ) =  <Test Value Here...
  • v-yulgu-msft's avatar
    v-yulgu-msft
    8 years ago

    Hi Ffitzpatrick47,

     

    In this scenario, there is no difference.

     

    VALUES returns a one-column table that contains the distinct values from the specified table or column. HASONEVALUE returns TRUE when the context for columnName has been filtered down to one distinct value only. The usage of these two functions are different, but the returned result is the same. They can be used to check the numer of unique records of a column.

     

    Regards,

    Yuliana Gu