Forum Discussion

hemingt's avatar
hemingt
Helper V
6 years ago
Solved

How to use VALUES function with filters in DAX

Hello,

Do you know how to use the VALUES function with filter?

I want to get one unique column by VALUES function, and this column also should base on another column condition according to the SELECTEDVALUE?

such as Column A, B

I want to get the VALUES(column A which column B=SELECTEDVALUE)

4 Replies

    • hemingt's avatar
      hemingt
      Helper V

      Thank you v-lili6-msft 

      I use the below to solve my problem

      CALCULATETABLE(VALUES(Tasks[Week]), FILTER(Tasks, Tasks[Fix Version] = SELECTEDVALUE(Tasks[Fix Version])))
    • hemingt's avatar
      hemingt
      Helper V

      it seems that my solution did not work.

      CALCULATETABLE(VALUES(Tasks[Week]), FILTER(Tasks, Tasks[Fix Version] = SELECTEDVALUE(Tasks[Fix Version])))

       

      I have a table Tasks, and want to firstly apply the filter "Tasks[Fix Version] = SELECTEDVALUE(Tasks[Fix Version])"

      then get the unique value of the column Week by using VALUES.

       

      Do you know how to do?

       

       

  • anyone who can help on this topic? Thank you very much!

    if there is anythin unclear, please let me know.