Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Get Current Selections?

Lets say my data is something like :

Customer | Region | Sub Region | Country

If I select a particular customer from a list box can I use :

getcurrentselections(Customer)

To return the Region / Sub Region / Country in an expression?  I want to show top 10 sales items for the Customer / Country / Region etc?


Thanks in advance.

1 Solution

Accepted Solutions
Not applicable

Find in your Help: Set Analysis.

There are also many additional documents and informations on the forum

P() gives possible values

E() gives excluded values

regards

Darek

View solution in original post

18 Replies
MK_QSL
MVP
MVP

Kindly describe briefly or more specifically your requirements...

Dont understand properly.

Not applicable

But why?

If you select some customer or make any other selection, QV will propagate it to any other, associated field in entire data model. So, in your expressions you typically don't need to check if something is selected


regards

Darek

dmac1971
Creator III
Creator III
Author

Yes understand that, however I have more than one customer in each country/region etc.  I want to see the top 10 items for the country for all customers, not just the one selected, hence my thoughts where to return the region/country etc using the getcurrentselections?

Basically I want to emulate vlookup from excel, look up the region, subregion, country etc based on the selected customer?  Thanks.

Not applicable

so, you like to select customer(s) and show in your chart top ten customers for each country, where selected customer has any transaction?

dmac1971
Creator III
Creator III
Author

No.

I can show the selected customer's, chosed from listbox, top 10 items easily.  However based on this selected customer I now want to show the total country and regions top 10 items, including this customer but also all other customers in that country and region.

Not applicable

But is that customer selection affect country selection?

May you share xls file with data example and draft of chart you would like to achieve in QV?



dmac1971
Creator III
Creator III
Author

OK lets say the data looks like this :

CustomerItemDescQTYSales ValueCountryRegionSubregion
Customer A1.1.1Pan2100FranceEuropeWestern Europe
Customer A1.1.1Pan2100FranceEuropeWestern Europe
Customer B1.1.1Pan150SpainEuropeWestern Europe
Customer C1.1.2Knife220ItalyEuropeSouthern Europe
Customer A1.1.3Cup240FranceEuropeWestern Europe
Customer B1.1.5Plate5150SpainEuropeWestern Europe
Customer C1.1.1Pan10500ItalyEuropeSouthern Europe
Customer A1.1.5Plate20600FranceEuropeWestern Europe
Customer C1.1.4Fork25250ItalyEuropeSouthern Europe
Customer D1.1.3Cup480FranceEuropeWestern Europe
Customer D1.1.5Plate6180FranceEuropeWestern Europe
Customer D1.1.1Pan11550FranceEuropeWestern Europe
Customer B1.1.2Knife20200SpainEuropeWestern Europe
Customer A1.1.3Cup10200FranceEuropeWestern Europe
Customer C1.1.5Plate15450ItalyEuropeSouthern Europe
Customer D1.1.1Pan5250FranceEuropeWestern Europe
Customer D1.1.3Cup501000FranceEuropeWestern Europe
Customer C1.1.3Cup601200ItalyEuropeSouthern Europe
Customer A1.1.5Plate20600FranceEuropeWestern Europe
Customer B1.1.2Knife50500SpainEuropeWestern Europe
Customer D1.1.2Knife550FranceEuropeWestern Europe
Customer C1.1.1Pan3150ItalyEuropeSouthern Europe
Customer A1.1.5Plate390FranceEuropeWestern Europe
Customer D1.1.2Knife440FranceEuropeWestern Europe
Customer D1.1.3Cup5100FranceEuropeWestern Europe
Customer A1.1.1Pan6300FranceEuropeWestern Europe
Customer B1.1.5Plate5150SpainEuropeWestern Europe
Customer B1.1.1Pan7350SpainEuropeWestern Europe

And my top 10 items for customer A are :

Top Items For Customer
CustomerCustomer A
Row LabelsSum of Sales
  Value
1.1.51290
1.1.1500
1.1.3240
Grand
  Total
2030

But for the sub region they are :

Top Items For Subregion
SubregionWestern Europe
Row LabelsSum of Sales
  Value
1.1.51770
1.1.11700
1.1.31420
1.1.2790
Grand
  Total
5680

So in Qlikview by selecting Customer A from a list box I have a table that shows up to top 10 items, I also want to show top 10 items for country, subregion and region.  Is this doable?

ljackson
Creator
Creator

This is halfway to what you want, the chart shows the sales regardless of which customer you choose.

It just needs changing a bit to show only the countries relevant to the selected customer.  Perhaps someone else could help?

.

Not applicable

Like this?