12 Replies Latest reply: Mar 14, 2018 5:05 AM by Clemens-A. Scherer

# 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

• ###### Re: Calculation of total prices in script

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

and how?

• ###### Re: Calculation of total prices in script

I want to have a table that looks like this:

 Year Article Action amount 2008 BIKE Repair 1,00 € 2008 BIKE Sale 3,00 € 2008 CAR Repair 2,10 € 2008 CAR Sale 52,50 € 2008 TRUCK Repair 2,50 € 2008 TRUCK Sale 4,00 € 2009 BIKE Repair 1,20 € 2009 BIKE Sale 10,00 € 2009 CAR Repair 4,90 € 2009 CAR Sale 49,00 € 2009 TRUCK Repair 2,50 € 2009 TRUCK Sale 21,50 € 2010 BIKE Repair 1,00 € 2010 BIKE Sale 13,00 € 2010 CAR Repair 5,60 € 2010 CAR Sale 56,00 € 2010 TRUCK Repair 4,00 € 2010 TRUCK Sale 12,50 €
• ###### Re: Calculation of total prices in script

use this

• ###### Re: Calculation of total prices in script

thanks, that`s what I was searching for!

• ###### Re: Calculation of total prices in script

Hi,

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

Saludos

• ###### Re: Calculation of total prices in script

that`s very helpful, thank you!

• ###### 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

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

• ###### Re: Calculation of total prices in script

Or use something like this

• ###### Re: Calculation of total prices in script

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

• ###### 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.

• ###### Re: Calculation of total prices in script

ok, I´ll put in into my script. thanks!