Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Sum a column if another contains partial text

I need to sum a column if my quote columns "contains" certain text, it may not be exact because data entry people may put their initials at the end.  For example, I just wrote this, but it's only par...
  • Anonymous's avatar
    Anonymous
    9 years ago

    If I understand your formula correctly you would put it after the <>0 before the parentheses, then put (I assume) a second FIND() condition there. Something like

     

    FIIK = CALCULATE(
    	SUM('WorkBookBP'[Net Inv Amt]),
    	FILTER(
    		'WorkBookBP',
    		FIND(
    			"P1-123456789",
    			'WorkBookBP'[Quote Header.Quote Number],
    			,
    			0
    		) <> 0 ||
    		FIND(
    			"Q2-123456789",
    			'WorkBookBP'[Quote Header.Quote Number],
    			,
    			0
    		) <> 0
    	)
    )