Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar))

Hi All

I have a Pivot table 1 , which is working fine, i like to convert it to straight table.

Dimension :-

COMPANY_PAY

=If(aging_ar >= 1 and aging_ar <= 30, Dual('1-30', 1),

If(aging_ar >= 31 and aging_ar <= 60, Dual('31-60', 2),

If(aging_ar >= 61 and aging_ar <= 90, Dual('61-90', 3),

If(aging_ar >= 91 and aging_ar <= 120, Dual('91-120', 4), Dual('>121 ', 5)))))

 

Expresion :-

Sum(total_ar)

I like to convert it into straight table. Hope some one can advise me.

I try on Table 2 it display null :-

Dimension :-

COMPANY_PAY

Expresion :-

sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar))

The error is above expression.

Pauk Yeo

1 Solution

Accepted Solutions
prma7799
Honored Contributor III

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

PFA....

5 Replies
paulyeo11
Valued Contributor II

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

Hi All

Enclosed My QVW file.

If the expression no more syntax error , the first column of table 1 and 2 should be display same amount.

Paul Yeo

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

I haven't open your application. Condition should like below

sum(If(aging_ar >= 1 and aging_ar <= 30,total_ar))

Life is so rich, and we need to respect to the life !!!
prma7799
Honored Contributor III

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

Hi Paul Sir,

Try this

sum(If(aging_ar >= 1 and aging_ar <= 30,total_ar))

prma7799
Honored Contributor III

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

PFA....

paulyeo11
Valued Contributor II

Re: Where go wrong with this expression ? sum(If(aging_ar >= 1 and aging_ar <= 30),total_ar)) , it display null.

Hi P M

thank you very much it work fine now.

Paul

Community Browser