Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Sum of cost by version

Hello community,

Any ideas?

Regards

abhijith862
New Contributor III

Re: Sum of cost by version

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

hhajjali
New Contributor III

Re: Sum of cost by version

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

arvind1494
Valued Contributor

Re: Sum of cost by version

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