Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
jontydkpi
Not applicable

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

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

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

Hi,

Maybe this one would help.

Regards,

Janzen

Not applicable

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

Hi Janzen,

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

Regards,

SC

Not applicable

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

Hi,

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

Regards,

Janzen