Forum Discussion
cosminc
7 years agoPost Partisan
DAX multiple table filters intersection
Hi all, i have a base like below and need to create a measure with multiple filters intersection like this: VAR _first_filter all ID where Label = A and Value = 1 _second_filter all ID where Labe...
- 7 years ago
Hi cosminc ,
Please refer to below measure:
Count_rows = VAR temp_tab = ADDCOLUMNS ( Sample4, "Label number", CALCULATE ( DISTINCTCOUNT ( Sample4[Label] ), ALLEXCEPT ( Sample4, Sample4[ID] ), Sample4[Value] = 1 ) ) RETURN COUNTROWS ( FILTER ( temp_tab, [Label number] = 3 && [Label] = "C" ) )Best regards,
Yuliana Gu
- 7 years ago
Perfect!
Thanks,
Cosmin
v-yulgu-msft
7 years agoMicrosoft Employee
Hi cosminc ,
Please refer to below measure:
Count_rows =
VAR temp_tab =
ADDCOLUMNS (
Sample4,
"Label number", CALCULATE (
DISTINCTCOUNT ( Sample4[Label] ),
ALLEXCEPT ( Sample4, Sample4[ID] ),
Sample4[Value] = 1
)
)
RETURN
COUNTROWS ( FILTER ( temp_tab, [Label number] = 3 && [Label] = "C" ) )
Best regards,
Yuliana Gu