Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
israq
New Contributor II

Get related values base from selection

Hi Guys,

Hope someone can help me on this simple question

Below are the table with 2 dim and 1 exp.

Dim 2 List box created and user select B (Dim2) and expected result as per 2nd table

Dim 1Dim 2Qty
1000A1
1000B7
1000C2
2000D3
2000E4
2000F2
3000G5
3000B2
3000H5

Expected result

Dim 1Dim 2Qty
1000A1
1000B7
1000C2
3000G5
3000B2
3000H5

Any advise appreciated !!!

1 Solution

Accepted Solutions

Re: Get related values base from selection

May be this

Sum({<Dim2, Dim1 = P(Dim1)>}Qty)

3 Replies

Re: Get related values base from selection

May be this

Sum({<Dim2, Dim1 = P(Dim1)>}Qty)

Re: Get related values base from selection

In Qlik, if you select Dim2 as B, then the data is filtered to exclude all other data where Dim2 is not B.

So the output for the 2nd table will just be the 2 rows where Dim2 = B.

This is how selections work by default in Qlik, and not the way your user expected

Is your user wanting to select using Dim1 instead? Selection  1000 and 3000?

You can use Ctrl-Click to select multiple values in a listbox.

Otherwise as Sunny  stalwar1‌ suggested you can use a set expression that sums the data for the selected value in Dim2 and also includes the possible values for Dim1  Dim1 = P(Dim1),

Though this makes your chart expressions more complex and does not follow the standard selection logic in QlikView.

israq
New Contributor II

Re: Get related values base from selection

Hi Guys,

Worked like a charm!!!