Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum issue in KPI or Text object

Hi everybody

I built an Qlik Sense App and faced a strange behaviour, but no doubt someone will highlight my misunderstanding

Context

My table has 50 records, 1 unique record by Id

for each record, i add a flag value 0 or 1 according some other field interpretation

when I use a KPI or TEXT object using sum(Flag)  I get 1

if I use a count(disitnct Id)  I get 50

When I select Flag = 1, and count(distinct Id)  I get 14 which is the number I should have  with sum(Flag)

So I don't underrstand why sum(Flag) returns 1

Any idea ?

Chris

1 Solution

Accepted Solutions
Not applicable
Author

Hi guys

thank you for your collaboration

The case is closed

I made a stupid mistake and confused 2 flags

1 is a normal result

sorry

Chris

View solution in original post

4 Replies
reddy-s
Master II
Master II

Hi Christianj,

Is it posssible to attach a sample qvf file so that it will be easy to solve the issue.

Thanks,

Sangram

ogster1974
Master II
Master II

If you need the KPI to only count records with flag=1 then

Try COUNT(ALL Flag) the lack of Aggregation I think is what's causing your issue.  SUM wont work as your flag I assume has 0 on the other side.

Regards

Andy

Not applicable
Author

Hi guys

thank you for your collaboration

The case is closed

I made a stupid mistake and confused 2 flags

1 is a normal result

sorry

Chris

ogster1974
Master II
Master II

Glad you sorted it.