Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JonasM95
Contributor II
Contributor II

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
agigliotti
Partner - Champion
Partner - Champion

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

View solution in original post

2 Replies
agigliotti
Partner - Champion
Partner - Champion

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

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