Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
"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.
Thanks in afvance
Try as simple?
sum({<DatumType={'Inkoop datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>}ReceivedQty) -
sum({<DatumType={'InvHist datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>} Qty_Afgifte)
You can reference the value of another expression in the same chart simply by referring to the expression's label. So in this case you'd simply use [Ontvangen ST] - [Afgifte ST]. If that doesn't work let me know.
Hello,
Thanks for the fast respons,
but I get absolutely no return when I add this expression.
Could you attach your application? Would make this a lot easier to solve.
Hey,
I don't know how I would do this correctly?
Try as simple?
sum({<DatumType={'Inkoop datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>}ReceivedQty) -
sum({<DatumType={'InvHist datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>} Qty_Afgifte)
Check this out
Anil,
Thanks,
I did have to use a + instead of -,
because afgite is a negative value,
but that works!!
I do have an additional question,
I have duplicate data as you can see above (the white line no title)
But the data is nog the same.
This probably isn't an easy fix.
Also another question, for the calculation of KG another qlik consultant used this:
=sum({<DatumType={'Inkoop datum'},POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"},Jaar=,Week=,Maand=>} ReceivedQty*DimA*DimB/1000000) * GSM / 1000
I don't get this. and results sometimes display, but sometimes they don't any hints?
Thanks a lot!
Thanks a bunch!! when i replaced the - with a + it worked like a charm.
could be there is no data after multi selection for this period
POrderDate={">=$(=date($(vStartDate)))<=$(=date($(vEndDate)))"}