Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qliky88
Creator
Creator

Sum String Returning Negative

Hi Experts, 

 

I have a simple sum(Status = 'Opened') KPI however it is returning -8 as opposed to +8

 

Any ideas? 

 

Thanks 

🙂 

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
sunny_talwar

This happens because Status = 'Opened' is evaluated as True or False. When true, it returns -1 and when false it returns 0. Try this instead

 

Count({<Status = {'Opened'}>}Status)

 

or you can also do this

 

-1 * Sum(Status = 'Opened')

 

View solution in original post

1 Reply
sunny_talwar

This happens because Status = 'Opened' is evaluated as True or False. When true, it returns -1 and when false it returns 0. Try this instead

 

Count({<Status = {'Opened'}>}Status)

 

or you can also do this

 

-1 * Sum(Status = 'Opened')