Forum Discussion
PowerBI123456
4 years agoPost Partisan
Help with example - filtering for more than 1 dimension
Hi - Appreciate anyone help. Attached is a simple example. I have 2 tables, one is my FACT which has the accounts with codes and the other is my DIM which are the codes. I am trying to do measure...
- 4 years ago
What about this:
Ch Measure = VAR ones = SELECTCOLUMNS(FILTER('FACT', RELATED(DIM[Code]) = "1"), "Account", 'FACT'[Account ]) VAR Twos = SELECTCOLUMNS(FILTER('FACT', RELATED(DIM[Code]) = "2"), "Account", 'FACT'[Account ]) VAR onesAndTwos = INTERSECT(ones, Twos) RETURN COUNTROWS(onesAndTwos)please test at your side.
HotChilli
4 years agoCommunity Champion
What about this:
Ch Measure =
VAR ones = SELECTCOLUMNS(FILTER('FACT', RELATED(DIM[Code]) = "1"), "Account", 'FACT'[Account ])
VAR Twos = SELECTCOLUMNS(FILTER('FACT', RELATED(DIM[Code]) = "2"), "Account", 'FACT'[Account ])
VAR onesAndTwos = INTERSECT(ones, Twos)
RETURN
COUNTROWS(onesAndTwos)
please test at your side.