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: 
KJD14
Contributor
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
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

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

View solution in original post

3 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

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

ramasaisaksoft

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.

farolito20
Contributor III
Contributor III

Hello,

 

Were you able to do this with Set Analysis?