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: 
pallabi_jor
Contributor
Contributor

How to write aggr function using conditions?

Hi  All,

I need to  write aggregation of  count of project basesd on productId  along with two sum conditions, But I am getting result 0, which is  not correct. Could you please help me to write the code

 

equation:

Count( distinct if(Aggr(Sum({<ItemID={'1','3'}>} Price)>'0' and Sum({<ItemID={'115','120','130'}>} price)='0',ProjectId), ProjectId))

2 Replies
ChennaiahNallani
Creator III
Creator III

ItemId is string or number??

remove single quotes and try

andrey_krylov
Specialist
Specialist

Try this

=Sum(Aggr(if(Sum({<ItemID={'1','3'}>} Price)>0 and Sum({<ItemID={'115','120','130'}>} price)=0, 1, 0), ProjectId))