Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
Anil_Babu_Samineni

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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

7 Replies
paulyeo11
Master
Master
Author

my QVW

Anil_Babu_Samineni

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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulyeo11
Master
Master
Author

Hi Anil

Thank you very much it work after testing.

Paul

luismadriz
Specialist
Specialist

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
Master
Master
Author

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
Master
Master
Author

Hi Anil

Many thank for offer me all the possible approach.

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

Paul