Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Help needed to conditionally assign a table variable in DAX (from SSRS dataset)

  Two quick things first.. One, I'm very new to DAX. Two, I'm using DAX in an SSRS dataset query (i.e. not in Power BI), so please let me know if there is a different forum where I should post this ...
  • AkhilAshok's avatar
    7 years ago

    Are you using GroupIDs_Selected as a filter to your main query? If that is the case a simpler approach is to just use FILTER and considering only GroupLabel. Since, DAX maintains lineage, you don't need to have the ID column for filter to work.

     

    DEFINE
        VAR GroupIDs_Selected =
            FILTER (
                VALUES ( 'Groups'[GroupLabel] ),
                'Groups'[GroupLabel] = userInput
                    || userInput = "All"
            )