Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

undergrinder
Valued Contributor II

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.

1 Solution

Accepted Solutions
undergrinder
Valued Contributor II

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.

Névtelen.png

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

G.

9 Replies
MVP
MVP

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

undergrinder
Valued Contributor II

Re: Totals function issue with percentages

Thank you for the comment!

Here is an example:

Névtelen.png

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.

MVP
MVP

Re: Totals function issue with percentages

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

undergrinder
Valued Contributor II

Re: Totals function issue with percentages

Yes, exactly

MVP
MVP

Re: Totals function issue with percentages

Try this:

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

undergrinder
Valued Contributor II

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.

Névtelen.png

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

G.

MVP
MVP

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

undergrinder
Valued Contributor II

Re: Totals function issue with percentages

Thank you for your help!

MVP
MVP

Re: Totals function issue with percentages

No problem