Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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
Try the set analysis wizard from Qlikblog
http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=
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
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