Forum Discussion

dexter's avatar
dexter
Helper II
7 years ago
Solved

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...
  • ofirk's avatar
    ofirk
    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: