Forum Discussion
peterhui50
3 years agoHelper III
Filtering two different tables with OR
I am not sure what I am doing wrong, but there is the data model and there are the data that's in Table B and Table C - they are identical TableB TableC I basically ...
- 3 years ago
This worked
Measure =VAR Table_Test = SUMMARIZECOLUMNS(A[NAME], "B_Totals", SUM(B[Count]), "C_Totals", SUM(C[Count]))RETURNCALCULATE( [Row_CountA], FILTER(Table_Test, [B_Totals] = 1 || [C_Totals] = 2))returned the value of 2 because there are two rows in table A, that matches the criteria of Table B totals = 1 OR Table C totals = 2
peterhui50
3 years agoHelper III
This worked
Measure =
VAR Table_Test = SUMMARIZECOLUMNS(A[NAME], "B_Totals", SUM(B[Count]), "C_Totals", SUM(C[Count]))
RETURN
CALCULATE( [Row_CountA], FILTER(Table_Test, [B_Totals] = 1 || [C_Totals] = 2))
returned the value of 2 because there are two rows in table A, that matches the criteria of Table B totals = 1 OR Table C totals = 2