# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Not applicable

## QuestionQuestion

I'm trying to write an if statement to only show Quarantined Inventory. Wanting to separate it from the total inventory count. I'm either getting an 0 or a number higher than my current inventory count. Below is my current if statement and how I populate inventory. Any and all help will be most welcomed.

If( [InvHistory Transaction Type] = 'Quarantined' , \$(InventoryQuantity) , 0)

sum({\$< [Inventory Date] = {"<=\$(=date(max(Date)))"},
Year={*},
Period={*},
Date={*},
Month={*},
[Calendar Year] = {*},
[Inventory Status Code] -= {1},
>}
[InvHistory Transaction Quantity])

3 Replies
Highlighted
MVP

[InvHistory Transaction Type]={'Quarantined'},

Highlighted
MVP & Luminary

Just to clarify John's response - you can't ask this question outside of your sum(). Instead, you should either ask it inside the SUM(), or better off, add it as another filter in your set analysis condition.

cheers,

Oleg Troyansky

Oleg Troyansky

Masters Summit for Qlik is going virtual! Dec 16th - I'll teach Performance Tuning

Highlighted
Not applicable

Thank you guys for helping. This is how I solved it. Used      [Inventory Quarantined] ={'Quarantined'},     .

sum({\$< [Inventory Date] = {"<=\$(=date(max(Date)))"},
Year={*},
Period={*},
Date={*},
Month={*},
[Calendar Year] = {*},
[Inventory Status Code] -= {1},
[Inventory Quarantined] ={'Quarantined'},