12 Replies Latest reply: Aug 8, 2017 9:13 AM by Lukas Roček

# Sum of Attributes

Hi all,

I have a problem:

I have attributes EEE and FFF in Column Name and I would like to show two thinks:

1.) I want to show attribute XXX as Sum of EEE and FFF

This sum is solved by this code: if(Name='EEE' or Name='FFF', 'XXX', Name) as Name

So I see only XXX, BUT:

2.) I want to show also EEE and FFF attributes as before

So, I would like to show table as below:

• ###### Re: Sum of Attributes

Might, but I do not have Qlik View...

• ###### Re: Sum of Attributes

can you post some sample data?

• ###### Re: Sum of Attributes

Dataset is this table, but I have only EEE and FFF records, but I want to XXX as sum and show also EEE and FFF, nothing more

• ###### Re: Sum of Attributes

yes, but I can't load this image into Qlik sense to create a sample that you can refer too!!

• ###### Re: Sum of Attributes

Here is a what you need to do

FACT:

Name,Pass,Fail

A,1,1

B,1,1

C,1,1

D,1,1

E,1,1

F,1,1

];

DisplayNAMES:

D_Name,Name

A,A

B,B

C,C

D,D

E,E

F,F

X,E

X,F

];

Now use D_Name in your Dimensions

• ###### Re: Sum of Attributes

May be try like this

Table:

Name, Total

AAA, 18737

BBB, 17556

CCC, 274242

DDD, 46279

EEE, 10596

FFF, 1241699

GGG, 139449

HHH, 479850

JJJ, 45065

];

Concatenate (Table)

Total

Resident Table

Where Match(Name, 'EEE', 'FFF');

• ###### Re: Sum of Attributes

Thank you !

• ###### Re: Sum of Attributes

Dude replicating the facts is unnecessary here, just saying

also it will cause inflated figures when then dimension is not used in things like KPI's

• ###### Re: Sum of Attributes

Agreed

• ###### Re: Sum of Attributes

Yeah, it is truth, I must use set analysis for KPI now, but problem is solved, thank you for warning