Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Fetch values from 2 files in same table by selecting one button

Hi,

I'm trying to do the foront end analytics as follows:

I have SKU, W1, Vel1, WOH1, Pallets and Units from table1,

and

I have SKU, W2, Vel2, WOH2 from table2,


My first table should show me the values:


W1     Pallets       Units


My Second table should show me:

W1    SKU(related to W1)       Vel2(related. to W2)\


Please find the attached qlikview file.



1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Pick(Match(W1, 'A', 'B', 'C', 'D'), Only(TOTAL {<W2 = {'A'}>}Vel2), Only(TOTAL {<W2 = {'B'}>}Vel2), Only(TOTAL {<W2 = {'C'}>}Vel2), Only(TOTAL {<W2 = {'D'}>}Vel2))

Note: When there is only one value, Sum/Min/Max/Avg/Only will all give you the same value

HTH

Best,

Sunny

View solution in original post

6 Replies
ramoncova06
Specialist III
Specialist III

not sure I get what you want to do

sunny_talwar

Is this what you want?

Capture.PNG

Used this expression to find average of Vel2 for each each W2:

=Pick(Match(W1, 'A', 'B', 'C', 'D'), Avg(TOTAL {<W2 = {'A'}>}Vel2), Avg(TOTAL {<W2 = {'B'}>}Vel2), Avg(TOTAL {<W2 = {'C'}>}Vel2), Avg(TOTAL {<W2 = {'D'}>}Vel2))

HTH

Best,

Sunny

markgraham123
Specialist
Specialist
Author

Hi Sunny,

In a case, where i donot want to take a average (If there were single values so no need to take avg.)

Just wanna display the value of V2 of W2.

Can u pls help me.

sunny_talwar

Try this:

=Pick(Match(W1, 'A', 'B', 'C', 'D'), Only(TOTAL {<W2 = {'A'}>}Vel2), Only(TOTAL {<W2 = {'B'}>}Vel2), Only(TOTAL {<W2 = {'C'}>}Vel2), Only(TOTAL {<W2 = {'D'}>}Vel2))

Note: When there is only one value, Sum/Min/Max/Avg/Only will all give you the same value

HTH

Best,

Sunny

markgraham123
Specialist
Specialist
Author

U nailed and rocked it again.

sunny_talwar

Hahahaha Glad I was able to help

Have a great weekend.

Best,

Sunny