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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total Percentages

Hi all,

From the example seen below, instead of having 100% for the Sales %, how can I get the sum of the sales %'s?  i.e. Instead of 100%, I will have 99.9%?

Currently in my dimensions, I have something like this:

=aggr(if(rank(Sum({< TransactionType = {'PLSF'}, MN_Num = {$(vReportingDate)} >} CONTRACTED_Euro /1000000 ) * vDspCurrXrate  ) <= 10, Only({< TransactionType = {'PLSF'} >} [Client Group])), [Client Group])

Capture.JPG

8 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

You could try changing the Total Mode of your expression from Expression Total to Sum of Rows.

Not applicable
Author

Hi Marcus,

Its already set to sum of rows. But it has not made any differences

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Ok then, it's likely that you have some values being rounded down.

For example

1.53

1.53

1.53

Sum = 4.59

In this example if you show it to 1dp, you'll see

1.5

1.5

1.5

Sum = 4.6

You could try using round in your expression

round ([Your Existing Expression], 0.1)

And retain Sum of Rows

Not applicable
Author

I understand what you just said, however, I dont want to round the values, I want to use them as they are

e.g. 38.2 + 29.8 + 17.6 etc.

Is this not possible?

marcus_malinow
Partner - Specialist III
Partner - Specialist III

If you use 0.1 as the second parameter for round, youll still see everything to 1dp

rubenmarin

Hi Sabah, the unrounded results (from the rounded sales data you posted) are:

 

16,338,2629108
12,729,8122066
7,517,6056338
1,43,28638498
1,12,58215962
0,81,87793427
0,71,64319249
0,71,64319249
0,71,64319249
0,71,64319249

and it sums 100, if you want it to sum 99,9 you need to round them to the first decimal as Marcus said.

Not applicable
Author

Thank you all for your help 🙂

Anonymous
Not applicable
Author

Hi Try below logic and setting .

See the example. You will get 99.9 % for your expression.