4 Replies Latest reply: Jun 26, 2014 11:34 PM by Ramkumar Ramagopalan

# Problem Script Half Year

Hi All,

Can you help me,

i have a template report with  ID & Dimension, and i want to sum amount half year '201307','201308','201309','201310','201311','201312'

if (ID = 'L19-1', sum({\$<PERIOD_REPORT={'201307','201308','201309','201310','201311','201312'}>} [AMNT]))

I've tried this script, but this script is not correct.

Thanks & Regards.

• ###### Re: Problem Script Half Year

try this.

sum ( {< ID={'L19-1'}, PERIOD_REPORT={'201307',.......}>} AMNT)

• ###### Re: Problem Script Half Year

Hi Ram,

I can't use Sum for the first script, please see my next script expression:

if (ID = 'L19-1', sum(Periode,('201307','201308','201309','201310','201311','201312') [amount],
if(ID = 'L19-2', sum(),
if(ID = 'L19-3', sum(),
if(ID = 'L19-4', sum(),
if(ID = 'L19-5', sum(),
if(ID = 'L19-6', sum(),
if(ID = 'L19-7', sum(),
if(ID = 'L19-8', sum(),
if(ID = 'L19-9', sum(),
if(ID = 'L19-10', sum(),
if(ID = 'L19-11', '',
)))))))))))

"L19-1" or "L19-2" and others<-- this is the field name

and the problem is how to write sum with Periode '201307','201308','201309','201310','201311','201312'

• ###### Re: Problem Script Half Year

sum (if (ID-'L19-1' and Match(PeriodCode,'201307','201308','201309','201310','201311','201312'), amount,

if (Match(ID,'L19-2','L19-3','L19-4','L19-5','L19-6','L19-7','L19-8','L19-9',L19-10'),amount,
0

) as amount)

resident

tab1;

• ###### Re: Problem Script Half Year

If you tried it in load script - it doesn't work, because you can't use set analysis in the load script.

But  for expression it looks good.