Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
JASalinas
Creator
Creator

Sum only positive values or Flag

Hi Friends, I have the next Set...

(sum({<YearPeriod = {"$(=Year(DatePeriod))"}, MonthNumPeriod = {">= {'1'} <=$(=max(MonthNumPeriod))"}, MonthPeriod=, [FUND]={"10*"}, ACCNT_CODE={"12*", "13*", "14", "32*", "33*", "34*", "36*", "A*", "C*", "E*", "R*"}>}[AMOUNT])
+ (sum({<YearPeriod = {">=1844 <=$(=Year(DatePeriod)-1)"}, MonthNumPeriod = {">=1<=12"}, MonthPeriod=, [FUND]={"10*"}, ACCNT_CODE={"12*", "13*", "14", "32*", "33*", "34*", "36*", "A*", "C*", "E*", "R*"}>}[AMOUNT])))

AND

= /***** Caja y Equivalente de Efectivo *****/
if((sum({<YearPeriod = {"$(=Year(DatePeriod))"}, MonthNumPeriod = {">= {'1'} <=$(=max(MonthNumPeriod))"}, MonthPeriod=, [FUND]={"10*"}, ACCNT_CODE={"12*", "13*", "14", "32*", "33*", "34*", "36*", "A*", "C*", "E*", "R*"}>}[AMOUNT])
+ (sum({<YearPeriod = {">=1844 <=$(=Year(DatePeriod)-1)"}, MonthNumPeriod = {">=1<=12"}, MonthPeriod=, [FUND]={"10*"}, ACCNT_CODE={"12*", "13*", "14", "32*", "33*", "34*", "36*", "A*", "C*", "E*", "R*"}>}[AMOUNT]))) > 0.00, 'C', 'D') and  create the next table..

JASalinas_0-1684966525507.png

I want to sum only values positives or Only flag values D...

thanks in advance

Labels (2)
1 Solution

Accepted Solutions
Benoit_C
Support
Support

Hi @JASalinas,

If you want to sum only positive values or only values with the flag ‘D’, you can try adding a condition to your set analysis expression to only include those values. For example, to sum only positive values, you can add a condition like AMOUNT={">0"} to your set analysis expression. To sum only values with the flag ‘D’, you can add a condition like FLAG={"D"} to your set analysis expression, where FLAG is the name of the field that contains the flag values.

Regards,
Benoit

View solution in original post

1 Reply
Benoit_C
Support
Support

Hi @JASalinas,

If you want to sum only positive values or only values with the flag ‘D’, you can try adding a condition to your set analysis expression to only include those values. For example, to sum only positive values, you can add a condition like AMOUNT={">0"} to your set analysis expression. To sum only values with the flag ‘D’, you can add a condition like FLAG={"D"} to your set analysis expression, where FLAG is the name of the field that contains the flag values.

Regards,
Benoit