Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display conditions

Hello to all,

I am a new user of Qliksense and I have a problem which I cannot solve.

Indeed, I have a picture listing the market shares of the various products of a country which are calculated through a formula.

I would have two questions concerning it.

The first one is the following one: how to show market shares answering a condition which is the following one: if partDeMarché = There, then shown partDeMarché.

The second question is the following one: how to show X first values answering the previous condition?

Thank you in advance for any possible ideas.

By wishing you a pleasant day.

Best regards,

SD

1 Solution

Accepted Solutions
OmarBenSalem

See the attached app,

It's working with the data you've left:

Capture.PNG

View solution in original post

8 Replies
OmarBenSalem

Suppose we have this:

A bar chart:

Dimension : Territory Code

Measure: sum(sales)

Capture.PNG

As we know, each territory is within a region; so what If I want to focus on only OICA Region= Africa? and only focus on the territories within Africa?

How to write it in my measure?

Original Measure:

Sum(Sales)

=> sum({<OICA Region={'Africa'}>}Sales)

See, how the territory code shown are those within Africa although I did not filter with Africa:

Capture.PNG

Now, I want to limit my chart to first 10 Territory Codes:

Capture.PNG

Hope this helps?

Not applicable
Author

Thank you for your answer.

The condition is rather on the values (or measures) for the first question: so salt/populationCountry = X, then salt/populationCountry.

For the second question, your answer works for a dynamic crossed picture with several countries and for every country one wants only X first values which answer in first conditions?

OmarBenSalem

for the second part, yes sure.

The condition to show the 10 first depends essentially on your selections and filters and thus on the data the chart is working with.

For the first part? Can you provide a sample app to work with?

Or an image of table to show exactly, in clear manner, what you're willing to do?

Not applicable
Author

Of course.

For example, I have this :

   

Countryproduct Market Share
AllemagneBA1,5
AllemagneBC1,6
AllemagneCA1,8
AllemagneCB1,9
AllemagneEA2
AllemagneFF2,2
AllemagneGH2,3
AllemagneKA2,5
AllemagneMN2,8
AllemagneNA3

But  for the first part of my problem i want only display product where the value of MarketShare is lower than 2 (for example) like this

Countryproduct Market Share
AllemagneBA1,5
AllemagneBC1,6
AllemagneCA1,8
AllemagneCB1,9
AllemagneEA

2

Then i want only display third first values, like this

   

Countryproduct Market Share
AllemagneBA1,5
AllemagneBC1,6
AllemagneCA1,8

Thank you for your help !

OmarBenSalem

I think I kind of see what you're talking about; let's go back to my graphic;

As I said, I'mfocusing on Territory Codes of OICA Region Africa:

Current measure: sum({<OICA Region={'Africa'}>}Sales)

Capture.PNG

Cu

Now let's go back to your 2 questions:

1) Let's suppose I want to see sum(Sales) only for territories that have sum(Sales)>1000000 :

This means that I want to have a condition like this:

If sum(sales) of a territoriy(that exists in africa) is > 100000,then show it, else, do not show it :

if(Aggr( Sum({<[OICA region]={'Africa'}>}[Car sales]),[Territory code])>1000000,Sum({<[OICA region]={'Africa'}>}[Car sales]),Null())

Which leads as to this:

Capture.PNG

Now, we want to delete these countries with null() values:

Capture.PNG

Let's now answer your second question:

2)

I want based on my first condition, to see only the first 2 countries:

AND HERE WE GO :

Capture.PNG

Does this answer it?

OmarBenSalem

See the attached app,

It's working with the data you've left:

Capture.PNG

Not applicable
Author

Thank you very much. I think that it's the correct answer.

Now, i have a last question : It is possible to merge cells in QlikView ?

OmarBenSalem

Sorry for the late reply,

Can you provide me an example?

What exactly you want to do?

As yous did above?

The source and then the wanted result?

Thanks