Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Set Analysis into backend Script ?

HI All,

I need to convert SetAnalysis into back end script...

if(DR_CR='D',

sum(OPENING)+

sum({<TD_DOC_DT={"<=$(=max(TD_DOC_DT))"},TD_DOC_DT_Year=,TD_DOC_DT_Month=,TD_DOC_DRCR_FLAG={'D'}>}TD_DOC_AMT)-

sum({<TD_DOC_DT={"<=$(=max(TD_DOC_DT))"},TD_DOC_DT_Year=,TD_DOC_DT_Month=,TD_DOC_DRCR_FLAG={'C'}>}TD_DOC_AMT)

regards,

Heather

5 Replies
Not applicable

Re: Set Analysis into backend Script ?

Heather, we need a little more information, are all the fields involved int he same table?

Not applicable

Re: Set Analysis into backend Script ?

2 tables

Luminary
Luminary

Re: Set Analysis into backend Script ?

Hi Heather,

Where exactly lies your issue? What have you tried so far? At which step are you having problems?

Or do you simply hope we will do your job for free?

Re: Set Analysis into backend Script ?

If they are not in same table take this fields in single table and then you are able to create the expression in the backend because SET expression not worked in the load script.

Regards

Anand

Not applicable

Re: Set Analysis into backend Script ?

HI All,

Actualling there only some customers having opening amount till Sep -2011 in One Table...

One Table:

COMP_CODE,

     ACNT_YEAR,

     CAL_YEAR,

     MAIN_ACNT_CODE,

     SUB_ACNT_CODE as [Customer No],

     SUB_ACNT_CODE as Custcode,

     OPENING,

     DR_CR

In another table:

TD_TH_SYS_ID,

TD_DOC_DT,

month(TD_DOC_DT) as TD_DOC_DT_Month,

year(TD_DOC_DT) as TD_DOC_DT_Year,

date(Date#(year(TD_DOC_DT)&'-'&month(TD_DOC_DT),'YYYY-MMM'),'MMM-YYYY') as TD_DOC_DTYearMonth,

TD_DOC_DRCR_FLAG,

TD_DOC_AMT,

TD_MAIN_ACNT_CODE,

[Customer No]

Here I have to add the opening balance to customers who are having DR_CR flag='D'  added, if DR_CR='C' is Subtracted....

ACtually this the Logic I am working in Set Analysis Coming Correct....

I need to implement in Back ENd Script Calaculation & I have to bring as Finally bone AMount to a Customer No...

And the If Customer have not DOne any transaction in Any month automtatically previous month Amount Should be Carry Forwarded....

please help , If you want I will post my qvw

also.....

Thanks,

Heather