Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

howto: sum a data list

Hi Community,

could you help me?

A table contains these values:

Name                     Number

BOOK 1      ........... 20

BOOK 2 ................. 4

A12345 ...............    34

G45677 .................. 3

901020 ................   34

FRUIT ................. 34

DISK ..................  123

H12497 ..............    3

HowTo sum only:

A12345

G45677

901020

H12487

11 Replies
Highlighted

May be this:

Sum({<Name = {'A12345', 'G45677', '901020', 'H12487'}>}Number)

Highlighted
Partner
Partner

Hi,

t is more complicated because I do not know the list of items to be added. I could use a formula that allows to recognize that the value contains numbers.

So that,

if the value contains a high number otherwise not rule it out.

cludo.

Highlighted
MVP
MVP

Try to give Condition on Number


Sum({<Number= {"<=34"}>}Number)

Highlighted

How about this:

Sum({<Name = {"=Len(KeepChar(Name, '0123456789')) > 0"}>}Number)


Sum({<Name = {"=KeepChar(Name, '0123456789') * 1 > 10"}>}Number)

Highlighted

Wouldn't this Sum DISK also?

Highlighted
Partner
Partner

perfect.

Highlighted

So which of the solutions finally worked?

Highlighted
Partner
Partner

Hi

the solutions finally worked is

Sum({<Name = {"=KeepChar(Name, '0123456789') * 1 > 10"}>}Number)


Now,

may I group them in a linear table?

A12345 10

G45677 20

901020  5

H12487  50

NewName  = 85

NewName is the sum of A12345, G45677, 901020, h12487

Highlighted
MVP
MVP

Create Straight table

Dimension:

=Valuelist('NewName1','NewName2')

Expression:

=Pick(Match(Valuelist('NewName1','NewName2'),'NewName1','NewName2'),

Sum({<Name = {"=KeepChar(Name, '0123456789') * 1 > 10"}>}Number),

Sum({<Name = {"=KeepChar(Name, '0123456789') * 1 > 20"}>}Number))