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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Qlikview Formula

Hi

Need a quick help.  I have a formula showing Quantity  on Purchases Order for component code only:

Sum(Total<[Component Code]> If([Assembly Type] = 'ITEM', [Loc Qty on PO] * [Component Qty] )) * Weighting

This is for all branches.  However, I want to show the  quantity on Purchase Order  for one of our branches  Johannesburg ,only , and this is my formula:

if(Branch= 'Johannesburg', (Sum(Total<[Component Code]> If([Assembly Type] = 'ITEM', [Loc Qty on PO] * [Component Qty] )) * Weighting))

However this does not work and the result is blank.

Please can you help.

kind regards

Nayan

5 Replies
Not applicable
Author

Hi,

May be you can try this:

//For all branches

=sum({<[Assembly Type] = {'ITEM'}>}([Loc Qty on PO] * [Component Qty])*Weighting)

//For Johannesburg

=sum({<[Assembly Type] = {'ITEM'},Branch= {'Johannesburg'}>}([Loc Qty on PO] * [Component Qty])*Weighting)

Hope that helps.

Regards,

-Khaled.

Not applicable
Author

Hi Khaled

Thanks .  Will try it and let you know.

kind regards

Nayan

Not applicable
Author

Hi Khaled

Therer is an error in the formula.  The error that comes up is :

"Bad filed names(s): Weighting"

kind regards

Nayan

Not applicable
Author

Hi Khaled

I moved the bracket after weighting and placed it before and it worked.

regards

Nayan

Not applicable
Author

Hi Nayan,

Glad it's fixed. I would suggest you to use Set Analysis to write similar conditions in the future scenarios. It's a very powerful feature and you will get accurate results for your logical calculations with ease.

Regards,

-Khaled.