Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dennysetiawan
Partner - Contributor III
Partner - Contributor III

Can Subfield work inside Set Analysis?

Dear Expert,

I have a field named ActionCode which contains:

ZC/HRQCLNT/01

ZC/HRQCLNT/02

ZC/HRQCLNT/03

ZC/HRQCLNT/04

Now i want to Sum (Sales) where ActionCode containins number 01 and 03 using SubField function. So the function should like: SubField(ActionCode, '/', 3).

I've tried several ways like:

Sum({<ActionCode={$(=SubField(ActionCode,'/',3))={'01,'03'}}>} Sales)

or

Sum({<ActionCode={$(=Wildmatch(SubField(ActionCode,'/',3),'01','03'))}>} Sales)

But still not successfully yet.

Can anyone help me? Thank you.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Sum({<ActionCode={"=Wildmatch(SubField(ActionCode,'/',3),'01','03')" }>} Sales)

View solution in original post

4 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Danny,

I don't think in this instance subfield is necessary.

e.g.

Sum({<ActionCode={"*/01", "*/03"}>} Sales)

Marcus

tresesco
MVP
MVP

Try like:

Sum({<ActionCode={"=Wildmatch(SubField(ActionCode,'/',3),'01','03')" }>} Sales)

dennysetiawan
Partner - Contributor III
Partner - Contributor III
Author

Hi Marcus,


Thank you for reply.


I use SubField because the data is separated by the mark '/' and taken is the 3rd data from the separator. If using your solution, there may be the same data in the other separator. And for some other cases, I have to use SubField.


Can I implemented SubField inside Set Analysis?


Thank you.

dennysetiawan
Partner - Contributor III
Partner - Contributor III
Author

Thank you Tresesco