Forum Discussion

sfmike99's avatar
sfmike99
Icon for Advocate II rankAdvocate II
4 years ago
Solved

How can I use a calculated table to filter values in another table?

I have an unpivoted table of survey responses and the columns include: Respondent (ID) QuestionRoot(text) RowIndex(the response options) Value(their response) I have used CalculateTable and In...
  • sfmike99's avatar
    4 years ago

    Think I figured it out. As I said this failed because I was using a calculated table when DAX expected a single value:

     

    ('Raw Data'[Respondent] = (Target))

     

    But I found the "IN" command which produces the expected number of records:

     

    ('Raw Data'[Respondent] IN (Target))

     

    Very slick - lets me use CalculateTable and Intersect to build a list of matching respondents (with as many criteria as I like), then use the resulting table as a filter for other queries on the data.