Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

JonasM95
New Contributor

Sum only containing defined units

Hi everybody,

I am working on a Pivot Table that contains production output for several working places. Some working places are reporting different quantity units (for example pieces as well as kg). For that reason I have a source that links a working place with its desired unit.

Unfortunately I am not able to formulate a sum that only adds output entrys if their quantity unit matches the defined one.

=Sum({$<PROD.PMEIN = {$(PM2_0.VME)},PROD.PRODDAT2 = {"<=$(=num(Stichtag))"}>} PROD.GMNG_PRDME)

 

PM2_0.VME --> desired quantity unit (VME Soll)

PROD.PMEIN --> quantity unit in output entry (VME, concat seperated by '|' if more than one)

PROD.GMNG_PRODME --> output quantity (Output Ist should not be 0)

The tables PROD and PM2_0 are linked with a key. Second condition is working perfectly.

QlikView_example.png

Can anyone recognize my mistake? Please help!!

Best regards

Jonas

1 Solution

Accepted Solutions
Partner
Partner

Re: Sum only containing defined units

try this:
=Sum( {< PROD.PRODDAT2 = {"<=$(=num(Stichtag))"} >}
if( PROD.PMEIN = PM2_0.VME, PROD.GMNG_PRDME ) )
2 Replies
Partner
Partner

Re: Sum only containing defined units

try this:
=Sum( {< PROD.PRODDAT2 = {"<=$(=num(Stichtag))"} >}
if( PROD.PMEIN = PM2_0.VME, PROD.GMNG_PRDME ) )
JonasM95
New Contributor

Re: Sum only containing defined units

Thanks a lot for your quick reply, I have just tested and it seems to work.

Never thought that the solution would be so easy. Smiley Wink