Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

markgraham123
Contributor II

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

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

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

6 Replies
ramoncova06
Valued Contributor III

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

not sure I get what you want to do

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

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
Contributor II

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

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.

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

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
Contributor II

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

U nailed and rocked it again.

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

Hahahaha Glad I was able to help

Have a great weekend.

Best,

Sunny

Community Browser