Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Total Percentages

Hello my fellow QlikView friends.  I am trying to understand what QlikView does when it totals percentages.  As an example, see the example below.  I have a table that looks like this:

Count % (Daily)

0.0%

0.0%

0.0%

0.0%

-

0.0%

0.0%

0.0%

0.0%

0.0%

-6.5%

0.0%

0.7%

0.5%

-1.0%

-0.8%

-0.6%

-3.0%

-2.4%

-0.2%

-1.1%

-1.9%

36.5%

0.0%


which QlikView totals as 0.0%


so what exactly is QLikView doing to get that total value of 0.0%?  Thanks

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

By default, QlikView does not sum the values of the lines. And it shouldn't either.

Instead, it calculates the expression over the entire data set. This makes a great difference when calculating ratios, as you do here. Let's say that you want to calculate

   Sum( A ) / Sum( B )

and format this as a percentage. Then the most logical thing to do on the "Totals" line, is to calculate the same ratio but for the entire scope. Summing a number of percentages usually does not make sense.

That the total here is 0.0% does not need to strange. It could be that it is 0% for almost all data, and the numbers, e.g. 36.5%, could represent a very small fraction of the entire scope.

HIC

View solution in original post

9 Replies
sunny_talwar

It would depend on the expression you are using. Can you share your expression?

MK_QSL
MVP
MVP

In actual, it could be 0.000005% also and because you are showing only one decimal it is shown as 0.0%

hic
Former Employee
Former Employee

By default, QlikView does not sum the values of the lines. And it shouldn't either.

Instead, it calculates the expression over the entire data set. This makes a great difference when calculating ratios, as you do here. Let's say that you want to calculate

   Sum( A ) / Sum( B )

and format this as a percentage. Then the most logical thing to do on the "Totals" line, is to calculate the same ratio but for the entire scope. Summing a number of percentages usually does not make sense.

That the total here is 0.0% does not need to strange. It could be that it is 0% for almost all data, and the numbers, e.g. 36.5%, could represent a very small fraction of the entire scope.

HIC

Anonymous
Not applicable
Author

Thank you for the reply.  My expression is basically

(COUNT(Today.IDNumber)-COUNT(Yesterday.IDNumber))/COUNT(Yesterday.IDNumber)

Anonymous
Not applicable
Author

Thank you Henric.  That makes sense

Anonymous
Not applicable
Author

I am trying to replicate this in Excel.  Any thoughts?  Is it even possible in Excel?

Anonymous
Not applicable
Author

Count (Daily) = Today (Count) - Yesterday (Count)

Count % (Daily) = Today (Count) - Yesterday (Count) / Yesterday (Count)

Capture.JPG

The 0.0% is what I am trying to replicate in Excel

Anonymous
Not applicable
Author

Here are the numbers behind the percentages

Capture.JPG

Anonymous
Not applicable
Author

After reading and re-reading your comments, I decided to apply the same formula


Count % (Daily) = Today (Count) - Yesterday (Count) / Yesterday (Count)


to the totals row instead of simply summing, as you suggested.  It works.  Thank you