Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
devarasu07
Master II
Master II

if Condition

Hi,

Goal:

Want to show the Article only when SoldQty>0 and soh>0

=if(aggr(sum(SoldQty),ArticleNo)>0 and aggr(sum(soh),ArticleNo)>0,ArticleNo)

(if i use above expression any not working as expected - currently it just works soldqty>0 condition)

Thanks,Dev

4 Replies
Anil_Babu_Samineni

What if we have written this? where you are implementing

If(aggr(sum(soh),ArticleNo)>0,ArticleNo)

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
devarasu07
Master II
Master II
Author

Hi Anil,

I need to apply both measure condition (sum(SoldQty)>0 and sum(soh)>0) . it's article level report. Tks

if i use only one measure in that if condition its working fine. need to apply both for my report requirement .

Note: if either one measure has <0 then it should display the article, i just don't show article when both measure <=0.

Thanks, Dev

Anil_Babu_Samineni

That case, It should work.

=if(aggr(sum(SoldQty),ArticleNo)>0 and aggr(sum(soh),ArticleNo)>0,ArticleNo)

Would you provide sample? And soh is all lower cases. If one condition works it should work for two conditions

Note: Here, Your condition seems only get article when the condition value is >0. Then, How you are expecting <0 will accessible

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
avinashelite

share the sample app ...will check and let you know