Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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
Specialist III
Specialist III

not sure I get what you want to do

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

Specialist
Specialist

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.

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

Specialist
Specialist

U nailed and rocked it again.

Hahahaha Glad I was able to help

Have a great weekend.

Best,

Sunny