Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
gkcchowdary
Creator
Creator

tell me below req?

Table 1:

Id,product,area,amount,trend,cur_1,current_2

1,tv,hyd,1000,100,Abc,d

2,laptop,bang,2000,200,axc,fgh

3,mobile,mum,3000,300,Sgt,h

4,cars ,Pune,4000,400,abc,d

5,bike,Delhi,5000,500,abc,d

Table2:

Min,max,Abc,newabc,trend

0,10,0.01,0.02,100

11,20,0.03,0.04,200

My requirement is if abcd trend multiply with abc thath

means(100*0.01) otherwise trend multiply newabc (100*0.02)

4 Replies
sunny_talwar

Not sure I understand your requirement very well, can you please re-explain?

gkcchowdary
Creator
Creator
Author

Hi sunny

both table common field trend and curr_1,current_2 fields Data combined, once combined curr name like

abcd

axefgh like this ok.

so if name abcd trend  multiply second table abc field

If  not abcd than trend multiply with newabc field

If abcd =(100*0.01) multiply

not abcd =(100*0.02).

sunny_talwar

Like this?

Capture.PNG

Since only tv and laptop product have Abc and newabc values available we see a result for them. rest all becomes 0. Is this what you intended to get????

Script:

Table1:

LOAD *,

  cur_1&current_2 as Check

Inline [

Id, product, area, amount, trend, cur_1, current_2

1, tv, hyd, 1000, 100, Abc, d

2, laptop, bang, 2000, 200, axc, fgh

3, mobile, mum, 3000, 300, Sgt, h

4, cars, Pune, 4000, 400, abc, d

5, bike, Delhi, 5000, 500, abc, d

];

Table2:

LOAD * Inline [

Min, max, Abc, newabc, trend

0, 10, 0.01, 0.02, 100

11, 20, 0.03, 0.04, 200

];

MarcoWedel

Hi,

another solution could be:

=If(cur_1&current_2 like 'abcd',Abc,newabc)*trend

QlikCommunity_Thread_174949_Pic1.PNG

hope this helps

regards

Marco