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: 
hhajjali
Contributor III
Contributor III

Sum of cost by version

Hello community,

I have a little problem and I need your help.

I have the following 2 tables:

The first on contains:

STOCKITEMVERSIONQUANTITY

The N° is for the transaction. A transaction can affect multiple STOCK, ITEM. Each Item have its own version and it own QUANTITY.

The second one contains:

STOCKCOST CATEGORYCOST

The transaction has a COST by STOCK and CATEGORY of Work provide.

What I need is to calculate is the COST by VERSION for each STOCK which is a prorata of the total cost of the transaction taking into account the quantity of the items of the version. I consider a quantity has a fixed cost in a iteration for each stock.

Hope I am clear in my explanation.


You may found attached a qvf which contain the loaded data and a table that I begin to create to get Version by cost.

And the result of what I need in the excel file "Feuil3" yellow columns. The blue columns are intermediate columns that help me create the results.


Thanks a lot for your help.


4 Replies
hhajjali
Contributor III
Contributor III
Author

Hello community,

Any ideas?

Regards

abhijith862
Contributor III
Contributor III

If I am not wrong you could use SET ANALYSIS for the same.

hhajjali
Contributor III
Contributor III
Author

can you give me an expression from which I can begin?

arvind1494
Specialist
Specialist

make a inner join of two tables and then use sum(cost) in expression  and dimension as a version