7 Replies Latest reply: Jun 7, 2016 6:17 AM by kushal chawda

# set analysis

Hi,

I am trying to optimize a calculation because it is not always calculating correctly.

I Need to Change it into a set Analysis calculation but I dont get it to work.

sum((if (xrefNr like '6*' and linetype=158 and linetype='158' and xref_GRPCODE='2KRE' and not (doccode like 'Z*' or doccode like 'BANK*' or  doccode like 'A*'),Buchungsbetrag,0)))

Does somebody have an idea how the set Analysis must look like?

Chris

• ###### Re: set analysis

Try maybe something like

Sum(

{<xrefNr = {"6*"}, linetype = {158}, xref_GRPCODE = {'2KRE'}, docode -= {"(Z*|BANK*|A*)"}>}

Buchungsbetrag)

• ###### Re: set analysis

Hi Stefan,

what is difference between docode -= {"(Z*|BANK*|A*)"} & doccode -= {'Z*', 'BANK*', 'A*'}  ?

• ###### Re: set analysis

Besides that I misspelled doccode?

I've used a single field modifier list element, a compound search including three searches, instead of three set modifier list elements that each contain a search, but I don't think that makes a big difference.

Mine is shorter

• ###### Re: set analysis

shorter by the count of characters?

• ###### Re: set analysis

Yes, that's what I wanted to know with regards to performance. Thanks

• ###### Re: set analysis

May be this:

Sum({<xrefNr = {'6*'}, linetype = {158}, xref_GRPCODE = {'2KRE'}, doccode -= {'Z*', 'BANK*', 'A*'}>} Buchungsbetrag)

• ###### Re: set analysis

Thank you very much to all of you.

All Solutions worked :-)