Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with SET ANALYSIS

Hi guys,

I'm in trouble with an expression.

I have to do the sum of Field3 ONLY if Field1 = Field2.

I tried to solve my problem using this expression:

=sum( {$<Field1 = Field2>} Field3 )

but unfortunately it doesn't work.

It works fine only if I select a value from a list box, but I need it works with any selection.

Any help will be appreciated.

Thanks in advance

6 Replies
Not applicable

Set analysis is based on selected vlaues. If you want it to work without the selection try sum(if())   something like:   sum(if(Field1= Field2, Field3,0)   Regards  Rahul Lakhina

Not applicable

Hi Rahul,

First of all, thank you so much for your reply.

I alredy tried that kind of formula and it doesn't work.

I thought it could work.

Regards

Giampiero

Not applicable

What data do you have in Field 1 and 2 can you post an example? Plus you might have to aggr this over your dimension.   Try:   aggr(sum(if(Field1= Field2, Field3,0) ,dimension)   Regards  RL

Not applicable

Not applicable

Field 1 and 2 are plates of trucks.

Unfortunately it's quite difficult to me to post an example.

I tried aggr function but it doesn't work.

Thanks Rahul.

Regards

Giampiero

Not applicable

Rahul,

I can say you that Field 1 is in TAB1, Field2 & Field3 are in TAB2.

Hope it helps to better understand.

@Chris: Thanks a lot

regards

Giampiero