Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the figures from different rows in which they are having the same ID ?

Hi all,

I have some data and it is illustrated as tables below.

I would like to get the Amount for Category ‘R’ (250) and the SqFt (143) which having the same ID with the ID of Category ‘R’.

ID

Category

Amount

SqFt

001

E

0

0

001

F

0

143

001

R

250

0

001

W

0

0

The final result I would like to get is like this:

ID

Category

Amount

SqFt

001

R

250

143

Currently I can get the Amount for Category ‘R’ by using expression

=sum(if(Category='R', Amount))

But I have no idea to get the SqFt, which is 143.

Thanks in advance for your great helps.

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Does the field SqFt only contain a value for Category "F"?

Assuming you are displaying this in a table/chart with ID as a dimension, then the two expressions could be:

     Sum({<Category = {'R'}>} Amount)

     Sum({<Category = {'F'}>} Amount)

Hope this helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

Maybe this one would help.

Regards,

Janzen

Not applicable
Author

Hi Janzen,

How if the SqFt (143) not all the time is tied to Category 'F' ?

Regards,

SC

Not applicable
Author

Hi,

Yes you can remove the filtering of Category F and it will still show the proper value.

Regards,

Janzen