Qlik Community

Qlik Sense App Development

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

Highlighted
ecabanas
Contributor

TOTAL question

Hi

 

I'm using this expression to calculate the percentage of each item in total selection.

Sum (Revenues)
/
Sum (TOTAL<CalendarMonthName_C>(Revenues))

 

revenues.png

 

But I'm using in this expression and the results are that all items are 100%

Sum (unit_quantity * quantity_delivered)
/
Sum (TOTAL<CalendarMonthName_C>(unit_quantity * quantity_delivered))

weight.png

Any idea what I'm doing wrong?

 

Thank's

 

 

1 Solution

Accepted Solutions
ecabanas
Contributor

Re: TOTAL question

Great, nor it works

 

2019-05-15_20h59_00.png

thank's @sunny_talwar 

5 Replies
Vegar
Honored Contributor

Re: TOTAL question

My best guess without beeing able to examine your application is that the issue lies in quantity_delivered.  Does the field reside inside the same table as unit_quantity? Is it an one-to-one relation between the row unit_quantity and the row quantity_delivered?

Do you get expected output when using

Sum (unit_quantity * quantity_delivered)

 And when using

Sum (TOTAL<CalendarMonthName_C>(unit_quantity * quantity_delivered))

 

 

Please ekskuse my Norglish and Swenglish typos.
ecabanas
Contributor

Re: TOTAL question

Hi @Vegar 

Thank's for your reply, and no, the quantity_delivered comes from lines of revenues table and unit comes from the article database

best

 

Eduard

Re: TOTAL question

What is the expression for Weight Sold? Is it 

Sum (unit_quantity * quantity_delivered)

Do you see 1.991.581,00 repeated on all rows of the chart when you use this  

Sum (TOTAL<CalendarMonthName_C>(unit_quantity * quantity_delivered))

Alternatively, you can try this

Sum(unit_quantity * quantity_delivered)
/
Aggr(NODISTINCT Sum(unit_quantity * quantity_delivered), CalendarMonthName_C)

 

ecabanas
Contributor

Re: TOTAL question

Great, nor it works

 

2019-05-15_20h59_00.png

thank's @sunny_talwar 

Re: TOTAL question

Glad I was able to help