Forum Discussion
How to Dynamically Filter Table B Based on Parameters in Table A Using DAX?
Hi ashi7upt - You can create a new calculated table in Power BI that filters Table B based on the criteria specified in Table A.
FilteredTableB =
FILTER(
TableB,
VAR FilteredA =
CALCULATETABLE(
TableA,
TableA[parameter] = "a" && TableB[a] = TableA[value] ||
TableA[parameter] = "b" && TableB[b] = TableA[value] ||
TableA[parameter] = "c" && TableB[c] = TableA[value]
)
RETURN
COUNTROWS(FilteredA) = 3
)
Hope it works
- ashi7upt2 years agoHelper I
Yes, we can do this way but I have two concerns1. Filters in visuals are populated from a third table C values to Table A
Table C stored the combination of parameters to be applied.2. In TableA[parameter] = "a" && TableB[a] = TableA[value]
part of DAX TableA[parameter] = "a" will be written dynamically for every distinct parameter entry in
table A
How can we address both or any of these issues?
Regards