QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.

Clemens

Tags (4)
1 Solution

Accepted Solutions
MVP

use this

12 Replies
MVP

Re: Calculation of total prices in script

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

and how?

Valued Contributor

Re: Calculation of total prices in script

Hi,

Try this:

Billing:

Year,

Article,

Value,

Action,

Article&'-'&Action as "Rate"

Resident Data

;

Join

Billing:

Rate,

Price

Resident Prices

;

Saludos

MVP

Re: Calculation of total prices in script

Or use something like this

New Contributor

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 €
MVP

Re: Calculation of total prices in script

use this

Valued Contributor

Re: Calculation of total prices in script

Hi,

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

Saludos

New Contributor

Re: Calculation of total prices in script

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

New Contributor

Re: Calculation of total prices in script

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

Valued Contributor

Re: Calculation of total prices in script

Hi,

Try with:

Billing:

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.