Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dries_clairhout
Creator
Creator

Calculations of 2 collums

Dear users,

I have to calculate the difference between 2 values in a pivot table.

I am fairly new to qlik and could use some advice.

dd.png

"Ontvangen ST" should be subtracted by "Afgifte ST" the result shoul be in Voorraad ST.

Ontvangen ST:

= sum({<DatumType={'Inkoop datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>}ReceivedQty)

Afgifte ST:

sum({<DatumType={'InvHist datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>} Qty_Afgifte)

Can someone help me?

"Ontvangen ST" is the recieved Qty

"Afgifte ST" is the exported Qty

"Voorraad KG" is supply qty (so it should be Recieved Qty - Exported Qty)

I looked at every previous discussion and nothing works.

Please help.

Thank you!

2 Replies
rubenmarin

Hi Dries, you can copy both expressions and do the substraction, or just use the column names:

Voorraad KG = [Ontvangen ST]-[Afgifte ST]

MK9885
Master II
Master II

As suggested by Ruben,

Just subtract by column names

["Ontvangen ST"]  - ["Afgifte ST"]