Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cscherer
Contributor
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
MK_QSL
MVP
MVP

12 Replies
MK_QSL
MVP
MVP

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

and how?

fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

Try this:

Billing:

load

Year,

Article,

Value,

Action,

Article&'-'&Action as "Rate"

Resident Data

;

Join

Billing:

load

Rate,

Price

Resident Prices

;

Saludos

MK_QSL
MVP
MVP

Or use something like this

cscherer
Contributor
Contributor
Author

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

use this

fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

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

Saludos

cscherer
Contributor
Contributor
Author

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

cscherer
Contributor
Contributor
Author

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

fvelascog72
Partner - Specialist
Partner - Specialist

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.