Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

cscherer
New Contributor

Calculation of total prices in script

Hello,

I hope, you can help me. I have two different tables, one with amounts and one with prices. I want to create only one table of these two and want to calculate e.g. a total price for an amount.

Could you please help me and give some hints or a link, where a solution is described?

Thanks very much in advance,
Clemens

1 Solution

Accepted Solutions

Re: Calculation of total prices in script

use this

12 Replies

Re: Calculation of total prices in script

What is the final price/value you are looking for Car-Sales?

and how?

fvelascog72
Valued Contributor

Re: Calculation of total prices in script

Hi,

Try this:

Billing:

load

Year,

Article,

Value,

Action,

Article&'-'&Action as "Rate"

Resident Data

;

Join

Billing:

load

Rate,

Price

Resident Prices

;

Saludos

Re: Calculation of total prices in script

Or use something like this

cscherer
New Contributor

Re: Calculation of total prices in script

I want to have a table that looks like this:

 

Year Article Actionamount
2008BIKERepair1,00 €
2008BIKESale3,00 €
2008CARRepair2,10 €
2008CARSale52,50 €
2008TRUCKRepair2,50 €
2008TRUCKSale4,00 €
2009BIKERepair1,20 €
2009BIKESale10,00 €
2009CARRepair4,90 €
2009CARSale49,00 €
2009TRUCKRepair2,50 €
2009TRUCKSale21,50 €
2010BIKERepair1,00 €
2010BIKESale13,00 €
2010CARRepair5,60 €
2010CARSale56,00 €
2010TRUCKRepair4,00 €
2010TRUCKSale12,50 €

Re: Calculation of total prices in script

use this

fvelascog72
Valued Contributor

Re: Calculation of total prices in script

Hi,

Try adding a transaction id and then Sum(Price) * Sum(Value)

Saludos

cscherer
New Contributor

Re: Calculation of total prices in script

thanks for your help. The combination of Article&'-'&Action is a good idea!

cscherer
New Contributor

Re: Calculation of total prices in script

Thanks for your help. I`ll try to go on with the "key".

fvelascog72
Valued Contributor

Re: Calculation of total prices in script

Hi,

Try with:

Billing:

load

RowNo() as id,

Year,

Article,

Value,

Action,

Article&'-'&Action as "Rate"

Resident Data

;

You must add id as dimension if you want to show all your transactions but you can hide it if you want.

Saludos.

Community Browser