Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor

Set Analysis with 2 Fields - Greater Than

Hello,

I am trying to generate a formula that will give me a count of all inventory owners that have a TotalCurrentInventory that is greater than their AllocationMax, for a given AllocationGroup. 

First I need to calculate, if TotalCurrentInventory > AllocationMax for each Inventory Owner at a given AllocationGroup. Then I need a total count of all the InventoryOwners above their maximum broken out by AllocationGroup. 

I have tried the equation below, but it seems to give me a total count of all InventoryOwners, instead of just the InventoryOwners with TotalCurrentInventory > AllocationMax.

Count({<AllocationGroup = {"(TotalCurrentInventory > AllocationMax)"}>} Distinct InventoryOwner)

Has anyone found a solution for comparing set analysis where the value of one field is greater than another field?

 

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Set Analysis with 2 Fields - Greater Than

Try this:

=Count(distinct if(TotalCurrentInventory >AllocationMax,InventoryOwner))

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Set Analysis with 2 Fields - Greater Than

Try this:

=Count(distinct if(TotalCurrentInventory >AllocationMax,InventoryOwner))

View solution in original post

Highlighted
Valued Contributor III

Re: Set Analysis with 2 Fields - Greater Than

Hi ,

 

in which object you are wring this Set Analysis?(Text Box,Charts..etc) it will also important while writing Set Analysis.

as per my understanding you are trying in a Pivot Table

 =if( TotalCurrentInventory > AllocationMax,count(Distinct InventoryOwner))

 

correct me if my assumption is wrong.