Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 1 | Dim 2 | Qty |
---|---|---|
1000 | A | 1 |
1000 | B | 7 |
1000 | C | 2 |
2000 | D | 3 |
2000 | E | 4 |
2000 | F | 2 |
3000 | G | 5 |
3000 | B | 2 |
3000 | H | 5 |
Expected result
Dim 1 | Dim 2 | Qty |
---|---|---|
1000 | A | 1 |
1000 | B | 7 |
1000 | C | 2 |
3000 | G | 5 |
3000 | B | 2 |
3000 | H | 5 |
Any advise appreciated !!!
May be this
Sum({<Dim2, Dim1 = P(Dim1)>}Qty)
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.
Hi Guys,
Worked like a charm!!!