8 Replies Latest reply: Mar 30, 2017 3:12 PM by omar bensalem

# 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

• ###### Re: Display conditions

Suppose we have this:

A bar chart:

Dimension : Territory Code

Measure: sum(sales)

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:

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

Hope this helps?

• ###### Re: Display conditions

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?

• ###### Re: Display conditions

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?

• ###### Re: Display conditions

Of course.

For example, I have this :

 Country product Market Share Allemagne BA 1,5 Allemagne BC 1,6 Allemagne CA 1,8 Allemagne CB 1,9 Allemagne EA 2 Allemagne FF 2,2 Allemagne GH 2,3 Allemagne KA 2,5 Allemagne MN 2,8 Allemagne NA 3

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

 Country product Market Share Allemagne BA 1,5 Allemagne BC 1,6 Allemagne CA 1,8 Allemagne CB 1,9 Allemagne EA 2

Then i want only display third first values, like this

 Country product Market Share Allemagne BA 1,5 Allemagne BC 1,6 Allemagne CA 1,8

Thank you for your help !

• ###### Re: Display conditions

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)

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())

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

2)

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

AND HERE WE GO :

• ###### Re: Display conditions

See the attached app,

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

• ###### Re: Display conditions

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 ?

• ###### Re: Display conditions

Can you provide me an example?

What exactly you want to do?

As yous did above?

The source and then the wanted result?

Thanks