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

Show "Others" Row - Problem w/Averages

Hello,

In my straight table I'm creating a list of top 'X' rows. I've set the expressions to "Show Others Row". For sums no problem, you set the expressions Total Mode to "SUM" and it works great. The problem I'm encountering is with my "Others" data that is not sums but averages. I set the Total Mode to "AVERAGE" and it gives me the sum not the average of all other rows (see screen-print below).

Has anybody else encountered this? Is this a bug or is there a workaround?

Thanks

error loading image

1 Solution

Accepted Solutions
pover
Partner - Master
Partner - Master

Please report this as a bug.

But in the meantime, look at the attached workaround which has 2 parts.

Calculated dimension (Change the 2 for the number of values you want to show)

=aggr(if(rank(sum(Atomic_Value),4,1)<=2,City,'Others'),City)

Modified Expression

avg(aggr(sum(Atomic_Value)/sum(Value2),City))

Regards.

View solution in original post

8 Replies
Not applicable
Author

Please provide the sample data to try for a resolution to fix this issue.

Anonymous
Not applicable
Author

Isn't the blue line your "Total" line?
Like IT User suggest, share the documnet then we can have a closer look.

Not applicable
Author

Thanks for the response, I've created a very simple qvw to demo this behavior. See below. The first table just shows the data. The second I'm creating the "Others" row which is not averaging the "Other" 2 rows correctly.

I hope this clearly demonstates the issue.

Anonymous
Not applicable
Author

I see what you mean and what you expact, but with the option "Show Other Rows" is not a "Total".

The "Show Other Rows" option gives you the sum of the results of all the other values which are not in you "Max_number" rows.

Not applicable
Author

Yep that's the problem, it's summing the "Others" row vs. averaging it. Can you think of a work-around? I can't. If I show a value for the "Others" row on my Average column the users will be confused because the number will be very high and misleading. The only thing I can think of is adding the columns that make up the Average column and forcing them to calculate the "Others" average themselves in Excel or manually.

Any other suggestions?

Thanks - DB

Anonymous
Not applicable
Author

Suggestions? This depends on how you want to use it.

1. If there is a fixed amount of rows showed (max number) you could make the calculations already in the load script.

2. If you think showing the "Others" row is confusing you can just drop it by removing the check before "Show Other rows" But I don't know if that is an option.

I will try to come up with other suggestions later....

pover
Partner - Master
Partner - Master

Please report this as a bug.

But in the meantime, look at the attached workaround which has 2 parts.

Calculated dimension (Change the 2 for the number of values you want to show)

=aggr(if(rank(sum(Atomic_Value),4,1)<=2,City,'Others'),City)

Modified Expression

avg(aggr(sum(Atomic_Value)/sum(Value2),City))

Regards.

Not applicable
Author

All - I really appreciate everyones feedback on this. Karl good idea with a calculated dimension! I will use this approach for now and as you and others suggest report this as a bug for future releases.