Forum Discussion
Anonymous
7 years agoNot applicable
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 ...
- 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" )
AkhilAshok
Solution Sage
7 years agoAre 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"
)
- Anonymous7 years agoNot applicable
^ Thanks! That was the exact guidance that I needed!