Forum Discussion

ilcaa72's avatar
ilcaa72
Helper IV
7 years ago
Solved

VALUES() return table of unique values

why cant i write VALUES('calendar'[MonthName]) and drag this is a matrix and see the unqiue values of that column.  Isnt this function supposed to return the unqiue values of a column within a table?

  • No. Values function cannot be used directly to return result. It's use is limited as intermediate function, nested within another function.

     

    Ex:

    =COUNTROWS(VALUES('calendar'[MonthName]))

     

    If you stick the column into rows of Matrix. It will automatically aggregated/grouped by distinct.

    Then you can add measures to summarize data based on it.

     

    Though I'm not sure what end result you are after.

1 Reply

  • Chihiro's avatar
    Chihiro
    Solution Sage

    No. Values function cannot be used directly to return result. It's use is limited as intermediate function, nested within another function.

     

    Ex:

    =COUNTROWS(VALUES('calendar'[MonthName]))

     

    If you stick the column into rows of Matrix. It will automatically aggregated/grouped by distinct.

    Then you can add measures to summarize data based on it.

     

    Though I'm not sure what end result you are after.