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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum value based on + and - values

Hi All,

can anyone help me out in building logic/ writing exoression.

I want to sum the value from one field having positive and negative values.

the data in field is like this

Fieldname

500

550

-44

89

-456

I want to classify positive and negative values into two expressions.

can i use set analysis..like operator? what couls best way to represent?

Thank you

Regards,

Prajna

1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

Hi,

you can do something like this :

Sum({$<Fieldname={">0"}>}Fieldname) for positives

Sum({$<Fieldname={"<0"}>}Fieldname) for negatives

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

3 Replies
christophebrault
Specialist
Specialist

Hi,

you can do something like this :

Sum({$<Fieldname={">0"}>}Fieldname) for positives

Sum({$<Fieldname={"<0"}>}Fieldname) for negatives

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
Not applicable
Author

Thank you

Regards,

Prajna

er_mohit
Master II
Master II

See the attached file