Hi @PaulBendall ,
Do you want to get "AB-1, AB-2, AB-10" from "AB-1(a), AB-1(b), AB-2, AB-2(a), AB-2(b), AB-10"?
Since there's no "AB-1" in original data, but you want to get it, I think using IsMatch is not suitable in your case.
IsMatch function is used to filter items based on one pattern, the result should be the existing data in original data.
It will not change data.
What you want is more like cutting data, from "AB-1(a)" to "AB-1".
I suggest you try split() function, which could split data based on one separator.
Try this formula:
Distinct(AddColumns(collection,
"data",
First(Split(Value,"(")).Result
),
data
)
If you want to filter collection by using IsMatch firstly, you could try this:
Distinct(AddColumns(Filter(a,IsMatch(Value,"AB-"&"\d+",MatchOptions.Contains)),"data",First(Split(Value,"(")).Result),data)
//However, if all your data is like "AB-....", there's no need to use IsMatch any more. Just using the first formula that I post is enough.
Best regards,