Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
JAN. 24, Q&A with Qlik: Making the Move to Qlik Cloud Reporting: REGISTER NOW
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))