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

    Display conditions

    Salim DERGHOUM

      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
          omar bensalem

          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?

            • Re: Display conditions
              Salim DERGHOUM

              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?

                • Re: Display conditions
                  omar bensalem

                  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
                      Salim DERGHOUM

                      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 !

                • Re: Display conditions
                  omar bensalem

                  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?