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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

Condition

Hello All,

Attached files has item types with Demand and ONHAND, I am trying to get active, slow moving and obsolete item types

I need

sum(if(DMND>0,(DMND>ON_HAND),ON_HAND)) //////////active

sum(if(DMND<>0,(ON_HAND>-DMND),HAND)) ////////////////////slow

sum(if(DMND=0,ON_HAND>DMND,ON_HAND)) //////////////////////obs


but where ever ONHAND is '0'its giving me -1 which is wrong is there any other way to do it ?

Thanks,

D

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

This condition should work

If(DMND > ON_HAND and DMND >0 and DMND <>0 , If(ON_HAND>DMND,Sum(ON_HAND)))

From your data, you may don;t have ON_HAND values > DMND Values. For this you can check. Whether you have value or it showing all "There are no Exceed"

If(DMND > ON_HAND and DMND >0 and DMND <>0 , If(ON_HAND>DMND,Sum(ON_HAND),'There are no Exceed'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni
MVP
MVP

May be this?

If(DMND > ON_HAND, Sum(ON_HAND))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dseelam
Creator II
Creator II
Author

Thanks anil

How to include other condition DMND should be always >0

Anil_Babu_Samineni
MVP
MVP

This condition should work

If(DMND > ON_HAND and DMND >0 and DMND <>0 , If(ON_HAND>DMND,Sum(ON_HAND)))

From your data, you may don;t have ON_HAND values > DMND Values. For this you can check. Whether you have value or it showing all "There are no Exceed"

If(DMND > ON_HAND and DMND >0 and DMND <>0 , If(ON_HAND>DMND,Sum(ON_HAND),'There are no Exceed'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful