Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set a Total of a column expression that does not gets affected by particular row

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)

SalesSales %

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

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

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%')

View solution in original post

7 Replies
stigchel
Partner - Master
Partner - Master

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%')

maxgro
MVP
MVP

percentage also in number tab

Not applicable
Author

Hi,

You can use option Relative for expression =sum(Sales)

Not applicable
Author

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?

Not applicable
Author

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.

stigchel
Partner - Master
Partner - Master

You can qualify which dimension it should at for the TOTAL, syntax is:

TOTAL <YourDimension>