Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to QlikView and learning designing in QlikView personal edition. I am stuck at creating an expression for a table that calculates the total of sales of all products. For instance, I created a pivot table with Products on one side and the sales on the other side. The sales column expression is Sum(Sales) which calculates the sum of sales of that particular product. I want to add a Sales% column. I am not sure as how to create the Total Sales column (not for the particular product but for all the products available)
Sales | Sales % | |
---|---|---|
Product1 | =sum(Sales) | [sum (sales of product)/Total Sales]*100 |
Product2 |
Let me know if in case you need any other details.
Thanks in advance.
Regards,
Sivai
You can use the TOTAL qualifier to ignore dimensions, so
Sum(Sales)/Sum(TOTAL Sales)
To display as percentage:
Num(Sum(Sales)/Sum(TOTAL Sales),'0%')
You can use the TOTAL qualifier to ignore dimensions, so
Sum(Sales)/Sum(TOTAL Sales)
To display as percentage:
Num(Sum(Sales)/Sum(TOTAL Sales),'0%')
percentage also in number tab
Hi,
You can use option Relative for expression =sum(Sales)
Works as charm.. Thanks so much.. Is there a document or a reference site that you know of where some commonly used expressions are available?
Hi Piet,
Just in case, if I have three categories under each product, and if I want to find the %share by category total, is it then feasible to achieve the same?
For example, Product 1 has categ1, categ2, and similarly Product 2 has categ1, categ2, and categ3.
What I want to do is, Sum (Product1.categ1)/Sum of (Product1.categ1 + Product1.categ2)
Thanks in advance.
You can qualify which dimension it should at for the TOTAL, syntax is:
TOTAL <YourDimension>