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: 
Not applicable

Histogram with requirement for a field that depends on another field

Hello,

I would like to create multiple graphs.

I have a field area (Lorraine, Alsace, Rhône-Alpes, etc...), a department field (Moselle, Meurthe-et-Moselle, Meuse, Vosges, Bas-Rhin, Haut-Rhin, Ain, Savoie, Loire, etc...) and finally a salesId.

I would like to create a histogram that would give me for a selected region of the top 2 departments where there is more sales. For example, I want my histogram shows me for the Rhône-Alpes region, only the relevant departments by region and then keep only top 2.

I would find another solution than using the current selections. I tried with a set analysis but I have not found the right syntax for now...

Thank you in advance,

Prees

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can use below expression.

Sum({<Department = {"=Rank(Sum(Sales))<=2"}>}Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Look at the attachment, this is the map of France. For example, (top right on the map - region in blue) the region nammed "Lorraine" include four departements which are "Moselle", "Meuse", "Meurthe-et-Moselle" and "Vosges".

How can I create a chart giving me the number of sales departments belonging to a region ? This makes 4 bars in my graph about a region. Tha'ts what I want to do. You need to know is that, these two fields "region" and "departement" are in the same table. carte-regions avec départements.png