9 Replies Latest reply: May 5, 2015 4:25 PM by Sunny Talwar

# Totals function issue with percentages

Hi all!

I have a table with

• 1 dimension
• 2 measure
• measure A/measure B in percentages.

The table has Total row, and works right with measures, but the percentages columns Total has fake result. (I need the two measure ratio in percentages in the total row, not the sum|min|max|avg of the percentages column).

Is there any option to display in total row custom function or other techniques to show the desired result?

G.

• ###### Re: Totals function issue with percentages

There definitely is a way to achieve what you want, but you will need to provide a sample as well as the logic for your expect result.

Best,

Sunny

• ###### Re: Totals function issue with percentages

Thank you for the comment!

Here is an example:

The Total row is for the sum of facts and plans, but at the ratio this approach is false.

UPDATE: If I change the Total function to None, i get the desired result, but i do not know why.

G.

• ###### Re: Totals function issue with percentages

So ideally you would want to see 9/83 = 10.84% as the total?

• ###### Re: Totals function issue with percentages

Yes, exactly

• ###### Re: Totals function issue with percentages

Try this:

Sum(Aggr(Sum(FACT), DIM))/Sum(Aggr(Sum(PLAN), DIM))

• ###### Re: Totals function issue with percentages

Thank you,

the formula give the same result as sum(Fact)/sum(Plan), the problem was in the Total row.

The solution is change the Total function to None, but i do not understand why.

G.

• ###### Re: Totals function issue with percentages

Oh so you got it to work? Great. I am not very familiar with Qlik Sense, but I used my QlikView expertise to try and help you out.

I am glad you have your solution and I would suggest marking your answer as correct so that the thread is closed and can be used by others in the future

Best,

Sunny