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

How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Hi All



I have below expression working fine :-


If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=210'} >}total_ar  * 1) > 0,


Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=210'} >}total_ar  * 1))



After i modify the above expression to below , it does not return the correct value :-


If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=210 & <360'} >}total_ar  * 1) > 0,


Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=210 & <360'} >}total_ar  * 1))


Where i go wrong ?



Paul


1 Solution

Accepted Solutions

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

I haven't test, But perhaps this?

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=210 <360"} >}total_ar  * 1) > 0,

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=210 <360"} >}total_ar  * 1))

Life is so rich, and we need to respect to the life !!!
7 Replies
paulyeo11
Valued Contributor II

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

my QVW

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

I haven't test, But perhaps this?

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=210 <360"} >}total_ar  * 1) > 0,

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=210 <360"} >}total_ar  * 1))

Life is so rich, and we need to respect to the life !!!

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Or Even, This will work?

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {"=aging_ar>=210 and aging_ar<360"} >}total_ar  * 1) > 0,

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {"=aging_ar>=210 and aging_ar<360"} >}total_ar  * 1))


OR

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {"=Sum(aging_ar)>=210 and Sum(aging_ar)<360"} >}total_ar  * 1) > 0,

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {"=Sum(aging_ar)>=210 and Sum(aging_ar)<360"}>}total_ar  * 1))

Life is so rich, and we need to respect to the life !!!
paulyeo11
Valued Contributor II

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Hi Anil

Thank you very much it work after testing.

Paul

luismadriz
Valued Contributor

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Hi, this is very strange!

Paul, on a previous post today you mentioned that you lost a good number of points because you changed your profile and that you earn points by making lots of questions and that you should be in the top 30...good! Even with the profile change you still have a very decent number of points (3000+ Wizard)

Now, would you say that someone with your experience would make a change to a search string from this: {'>=210'} to this: {'>=210 & <360'}??? I personally don't think so that's why I think this post of your is very strange.


I truly hope this is not a regular practice


Luis




paulyeo11
Valued Contributor II

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Hi Luis

Thank you for your email.

Yes in fact I try to avoid asking before I try to search for solution.

In fact before I post this question , I did try , but I am unable to get the result I want.

I try to use the & and AND also OR , still not able to get the result I want.

In future I will put in more effort to search for answer before I ask.

Paul Yeo

paulyeo11
Valued Contributor II

Re: How to make Table 1 return 25,602-16,209= 9,393 amount , now it display 1599,664 is wrong.

Hi Anil

Many thank for offer me all the possible approach.

This is useful for those who are not so strong in coding.

Paul

Community Browser