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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Line Chart


Hi,

Please find the attached qvw file

I need to create a line chart

one line for Dell should be for default

and I need 3 more line of Top 3  Vendors

I tried using rank,aggr and sum but still I am not able to create it

Thank you.

3 Replies
jerem1234
Specialist II
Specialist II

See if attached is what you are looking for. Used dimensions of Quarter and Vendor with the expression:

sum({<Vendor = {'Dell', '=match(aggr(rank(sum(Share)), Vendor), 1, 2, 3)'}>}Share)

Hope this helps!

Anonymous
Not applicable
Author

Thanks for the help

But if we make selections in country level the graph has to display default +top 3 for that country

jerem1234
Specialist II
Specialist II

This should work for selections of country. Did you mean you want it to display the Top 3 no matter what country is selected?

Try this:

sum({1<Vendor = {'Dell', '$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor)))',

'$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor), 2))',

'$(=firstsortedValue({1}Vendor, aggr(rank(sum({1}Share)), Vendor), 3))'}>}Share)

Hope this helps!