Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rabbani_sk
Contributor III
Contributor III

How to add original data value of a single column in to a pivot table

Hi,

My issue is i hav 3 years of data , when i create a pivot table, it will shows us the 3 years of data included, but i need to add one column in that pivot table that should not be include 3 years of data , that column name is "Cost per unit"  need to display the cost per KG's in that column?

For Eg: 

Item         itemcode   Measuremnt  cost per unit   openg Qty   opng Value

Adhesive          c01               KG's           22000               440      26000

admin core       c02               KG's           30000               230      37000

Here the actual "Cost Per Unit" for  --Adhesive  Per KG is 200 Rs and   --Admin Core is 300 rs ,

the values displayed above for "Cost Per unit"  i.e 22000 and 30000 are 3 years of data included but , i need to represent the actual cost per KG's for item .

How to do it??


            

5 Replies
luciancotea
Specialist
Specialist

Cost/unit = Sum(Value) / sum(Qty)

Cost/KG = Sum(Value) / sum(Qty) / UnitWeightInKG

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     If the cost is unit wise and if you need to show in KG's, better you divide it by 1000.

     Clarify if this is not the case.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
rabbani_sk
Contributor III
Contributor III
Author

yes kaushik , absolutely it is not the case, in "Measurement" column u should need to show in terms of nums also measuremnt column will b like this below

Measurement,  cost per unit

KG's                    22000

KG's                    33000

Num's                  26000 

Pckts                    87

MM                       90

So, like this different measuremnt will be there , sorry for not mentioning remaining measuremnts???

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Its ok, is it possible for you to upload the sample qvw file which can replicate the same problem of yours, so that we can easily understand where its going wrong.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
rabbani_sk
Contributor III
Contributor III
Author

Hi Kaushik ,

I think I Almost done it, incase i got problem sure i will upload my Sample qvw, let me do it first.

Thank you .