Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (3)
1 Solution

Accepted Solutions
Not applicable

Re: Sum issue in KPI or Text object

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

4 Replies
reddys310
Honored Contributor II

Re: Sum issue in KPI or Text object

Hi Christianj,

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

Thanks,

Sangram

ogster1974
Honored Contributor II

Re: Sum issue in KPI or Text object

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

Re: Sum issue in KPI or Text object

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
Honored Contributor II

Re: Sum  issue in KPI or Text object

Glad you sorted it.

Community Browser