Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

SUM TOTAL and AVG

Dear all,

I need a solution for my problem. I want to use the totals of the tables below for further calculations.

There must be a solution, but I couldn't find it. I tried AGGR, sum(total <field>), but without result.

code-order.gif

Order 960 has 5 codes of 30 and order 961 has 1 code of 30.

I need the following figures:

- Total Orderbedrag = 180

- Avg Orderbedrag = 90

- Avg Bonbedrag = 30

Can you help me with this?

Kind regards,

Erwin

19 Replies

Re: SUM TOTAL and AVG

Can you share your sample data please?

Not applicable

Re: SUM TOTAL and AVG

Can you share a sample app with small data?

Not applicable

Re: SUM TOTAL and AVG

Hi Manish and Shyamal,

This comes from my DB, so I do not have sample data. Or can I export this to excel?

kind regards,

Erwin

Re: SUM TOTAL and AVG

Just give us few lines in excel...

Not applicable

Re: SUM TOTAL and AVG

Hi All,

I will add two xls files. Kind regards, Erwin

Re: SUM TOTAL and AVG

SUM([Order Amount])

SUM(TOTAL [Order Amount])/COUNT(TOTAL DISTINCT OrderId)

or

SUM([Order Amount])/COUNT(DISTINCT OrderId)

Dont have idea about

Avg Bonbedrag = 30

Not applicable

Re: SUM TOTAL and AVG

Hi Manish,

This does not seem to work.

below the results of your expressions:

code-order-v2.gif

Re: SUM TOTAL and AVG

What is the dimension you are using?

Not applicable

Re: SUM TOTAL and AVG

It doens't matter if I use orderId or codeId.

the sum total stays the same.

Community Browser