Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

gregoryt40
New Contributor

Set Analysis - One field equal but the other is not

Hey!

I want to create a set analysis that sums "Extended Cost" IF "Document Type" does not equal "Document Type" AND "Lot Number" EQUALS "Lot Number"

Please let me know your thoughts.

Thank you!

5 Replies

Re: Set Analysis - One field equal but the other is not

Document Type does not equal Document Type? Not sure I understand can you elaborate?

gregoryt40
New Contributor

Re: Set Analysis - One field equal but the other is not

This is all one table.


IF two items have the same lot number and the document type does not match (i.e. one is "IF" the other "RM"), I want to sum the extended amount by lot number.

Make sense?

Document TypeDocument NumberBatchNDC numberDescriptionLot numberTransaction QuantityUnit CostExtended AmountGl Date
IF6456234322ABC4-500.3401-17.011/13/2014
RM32346581CDE5100.22151/13/2014
MVP
MVP

Re: Set Analysis - One field equal but the other is not

In your sample, lot numbers differ. What do you want to do in this case?

Could you explain your requirements a bit more detailed?

What if Lot number is the same AND Document Type match? What if you have more than two records with different combinations of matching patterns?

gregoryt40
New Contributor

Re: Set Analysis - One field equal but the other is not

I only want to include those where the Lot number match and the document type do not match.

MVP
MVP

Re: Set Analysis - One field equal but the other is not

Maybe something like

Sum({<[Lot number] = {"=Count(Distinct [Document Type])>1"} >} [Extended Amount])

Community Browser