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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate % of a total

I am trying to create a calculation that gives me this year % of business. How would I do that using the example below:

BrandCustomer$ Amount% of Business
XYZCustomer A500.31
XYZCustomer B250.16
XYZCustomer C350.22
XYZCustomer D500.31
Sum XYZ160


I'm trying to figure out how to use an expression to calculate the last column. It has to be able to be dynamic based on the date/year selected.

Thanks!

1 Solution

Accepted Solutions
mike_garcia
Specialist
Specialist

Try This:

Sum(Amount) / sum(Total <Brand> Amount)


Mike.

Miguel García
Qlik Expert, Author and Trainer

View solution in original post

5 Replies
vgutkovsky
Master II
Master II

Well, the way QlikView works will dynamically reduce results automatically. So I would say just do a sum of the [% of Business] field. You probably also want to load that field in your script using GROUP BY Brand.

Regards,

mike_garcia
Specialist
Specialist

If it is an Straight Table, you can just check the 'Relative' option in the Expressions tab (Maybe after you've duplicated the first Expression).

If the Relative checkbox is not available, you can add an expression like

Sum(Amount) / sum (TOTAL Amount)


HTH.

Miguel García
Qlik Expert, Author and Trainer
Not applicable
Author

^^

How good is the relative feature? love it.

Not applicable
Author

Thank you. I think it's a little more difficult. I should provide more detail. I'm trying to find the percent based on the brand. For example, in the chart below I want to see the percent of XYZ business that customer A has, and also the percent of ABC business, etc. Not just a percent of the total business.

Brand FlagDivisionGSVPercent
XYZCustomer A5028.57%
XYZCustomer B10057.14%
XYZCustomer C2514.29%
ABCCustomer A20071.43%
ABCCustomer B5519.64%
ABCCustomer C258.93%
DEFCustomer A10040.00%
DEFCustomer B5020.00%
DEFCustomer C10040.00%


mike_garcia
Specialist
Specialist

Try This:

Sum(Amount) / sum(Total <Brand> Amount)


Mike.

Miguel García
Qlik Expert, Author and Trainer