partial
2 TopicsDAX Equivalent for Excel SUMIFS Where Lookup Field Contains Partial Text from Another Field
Morning all, I am relatively new to DAX and have scoured the forums but not found anything that quite works yet. I am trying to sum each record where the Member No is contained within the Hierarchy string e.g. the first Member No occurs in rows 1, 10 and 12 and sums to 23, whereas the 3rd Member No only appears in Hierarchy row 3 so sums to 3. The excel formula is: SUMIFS([Amount],[Hierarchy],"*"&[Member No]&"*") I tried adding "ab" to rows 5 & 9 as part of the attempt using the following formula to see if I could get close and then apply the "Like/contains" bit of logic but no luck: CALCULATE(SUM(Table1[Amount]),FILTER(Table1,FIND("ab",Table1[Hierarchy],,0)<>0)) I have also tried CALCULATE(SUM(Table1[Amount]),FILTER(Table1,Table1[Member No]=EARLIER(Table1[Member No]))) as a start, also with the idea of getting close and then adding the Hierarchy element, also with no luck. Any help would be hugely appreciated! Hopefully the description is understandable. Thank you in advance.Solved2.4KViews0likes6CommentsDAX Equivalent for Excel SUMIFS Where Lookup Field Contains Partial Text from Another Field
Morning all, I am relatively new to DAX and have scoured the forums but not found anything that quite works in Powerpivot/Dax yet. I am trying to sum each record where the Member No is contained within the Hierarchy string e.g. the first Member No occurs in rows 1, 10 and 12 and sums to 23, whereas the 3rd Member No only appears in Hierarchy row 3 so sums to 3. The excel formula is: SUMIFS([Amount],[Hierarchy],"*"&[Member No]&"*") I tried adding "ab" to rows 5 & 9 as part of the attempt using the following formula to see if I could get close and then apply the "Like/contains" bit of logic but no luck: CALCULATE(SUM(Table1[Amount]),FILTER(Table1,FIND("ab",Table1[Hierarchy],,0)<>0)) I have also tried CALCULATE(SUM(Table1[Amount]),FILTER(Table1,Table1[Member No]=EARLIER(Table1[Member No]))) as a start, also with the idea of getting close and then adding the Hierarchy element, also with no luck. Any help would be hugely appreciated! Hopefully the description is understandable. Thank you in advance.Solved1.6KViews0likes4Comments