Forum Discussion
dexter
7 years agoHelper II
calculating the count based on two conditional checks..
I have created a sample table shown below. ID Product Level Comments
100 Laptop A1 Dispatched
101 Laptop A1 Dispatched,Delivered
102 Mobile A3 Dispatched
103 PC A...
- 7 years ago
Hi,
In this case, considering A1Count, A2Count and A3Count are measures you already created, I'd create the following additional measures:
DeliveredA1Count = COUNTX(FILTER(ProdData, [A1Count]>0 && SEARCH("Delivered", [Comments], 1, -1) > 0), [id])
DeliveredA2Count = COUNTX(FILTER(ProdData, [A2Count]>0 && SEARCH("Delivered", [Comments], 1, -1) > 0), [id])
DeliveredA3Count = COUNTX(FILTER(ProdData, [A3Count]>0 && SEARCH("Delivered", [Comments], 1, -1) > 0), [id])
The result is as you described:
v-cherch-msft
7 years agoMicrosoft Employee
Hi dexter
You may refer to below measure:
DeliveredA1Count =
COUNTROWS (
FILTER (
'Table2',
'Table2'[Level] = "A1"
&& SEARCH ( "Delivered", Table2[Comments], 1, 0 ) > 0
)
)
+ 0
Regards,
Cherie