Forum Discussion
imadelmouden
7 years agoFrequent Visitor
Mesure with complex filters
I am new to DAX, and I want to do a complex filter with it. The thing is, I have a table : TableA : ID PHONE (phone number of users) TYPE_PHONE (contain either 0 or 1) VOLUME_LTE The ph...
- 7 years ago
... so you with your last edit.
May be this.
Measure = CALCULATE ( DISTINCTCOUNT ( Table2[PHONE] ), FILTER ( Table2, SUMX ( Table2, IF ( SUM ( Table2[VOLUME_LTE] ) = 0 && Table2[TYPE_PHONE] = 0 && Table2[VOLUME_LTE] = 0, 1, 0 ) ) > 0 ) )Using same sample table I showed before.
Result:
imadelmouden
7 years agoFrequent Visitor
Chihiro I think I didn't explain enough, I don't want to count how many times the phone appear with those conditions, I want to count JUST the number that has 0 total volume summarized,
phone volume_lte
99999999 45
44455555 0
55555555 15
44455555 0
55555555 0
So the output here is : 1 because the only number that has 0 volume in every row, is the 4445555
I hope I am clear now
Chihiro
7 years agoSolution Sage
... so you with your last edit.
May be this.
Measure =
CALCULATE (
DISTINCTCOUNT ( Table2[PHONE] ),
FILTER (
Table2,
SUMX (
Table2,
IF (
SUM ( Table2[VOLUME_LTE] ) = 0
&& Table2[TYPE_PHONE] = 0
&& Table2[VOLUME_LTE] = 0,
1,
0
)
)
> 0
)
)
Using same sample table I showed before.
Result: