3 Replies Latest reply: Jan 27, 2012 8:56 AM by Stefan Wühl RSS

    Calculating Share

      In qlick view , how can one set an expression where QV could calculate the share of a number in one dimension of the total of the dimension above it , in a pivot table .


      i.e. inside the category TVs , we have brands , how can one set an expression to calculate the sales share of this brand in the total sales of the category ? 

        • Re: Calculating Share
          Stefan Wühl

          If you have two dimensions, Category and Brand, and your sales field is called Sales, I think it's just


          =sum( Sales) / sum(total<Category> Sales)


          as expression, i.e. you just need an appropriate total qualifier with dimension list. Please check also the Help.

          Then you could format the share e.g in number tab as percentage.




            • Calculating Share

              Yes , also , i have a y-axis value as well or a column dimension , which is Branch , and the formula above would only give me the share of the sales of one dimension over the total of the other , but it would not give me the share depending on the y-axis dimension . i should've clarified it better .

                • Calculating Share
                  Stefan Wühl

                  Maybe an example would help me to understand - it's still a bit unclear to me, but I still think the total qualifier should be the one here,


                  either try


                  =sum(Sales) / sum(total<Category, Branch> Sales)



                  =sum(Sales) / sum(total<Branch> Sales)


                  just include in the total qualifier field list all dimensions that you need to group by.