New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How do I calculate the ratio of a sum total by each number of rows.

I want to get the ratio of total Store Sales ie 15.32M by each store sales. How can I get this division?

I tried putting the total Sales in a variable and then divided by using aggr function: Aggr(Sum(UNITS),STR_ACCOUNT_NAME_DESC).

I'm not getting the correct answer. I need it 15.32M/ Sales of store 1,Store 2 and so on in the table

Tags (2)
1 Solution

Accepted Solutions
MVP

Re: How do I calculate the ratio of a sum total by each number of rows.

May be this:

Sum(UNITS)/Sum(TOTAL UNITS)

or

Sum(TOTAL UNITS)/Sum(UNITS)

5 Replies
MVP

Re: How do I calculate the ratio of a sum total by each number of rows.

May be this:

Sum(UNITS)/Sum(TOTAL UNITS)

or

Sum(TOTAL UNITS)/Sum(UNITS)

Valued Contributor

Re: How do I calculate the ratio of a sum total by each number of rows.

Hi

try this !!!

Sum(Store Sales) /

Max(TOTAL Aggr(Sum(Store Sales),STR_ACCOUNT_NAME_DESC) ))

OR

Max(TOTAL Aggr(Sum(Store Sales),STR_ACCOUNT_NAME_DESC) ))/Sum(Store Sales)

Not applicable

Re: How do I calculate the ratio of a sum total by each number of rows.

Many Thanks, It worked

MVP

Re: How do I calculate the ratio of a sum total by each number of rows.

Did you mark you own answer as correct by mistake .

I would suggest marking the response which is actually correct, so that future users can find it useful when they land on this page.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

Not applicable

Re: How do I calculate the ratio of a sum total by each number of rows.

Oops Sorry, My bad. I corrected my mistake.

Community Browser