Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggr in count

Hi All,

I want to show count(products) based on 'sales < target'

exp : if(sales<target,count(products))

regioncountryproductstargetsales
a1p11020
b2p2209
c3p15045
d4p46061

Here for product 'p1', region 'c' sales is less than the target,but it aggregated with region 'a' .count it is showing 0, because target is aggr .

i want to show this in text box.

any help

8 Replies
PrashantSangle

Hi,

Can you post your complete expression which you are trying.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Gysbert_Wassenaar

Try count({<products={"=sum(sales)<sum(target)"}>}products)


talk is cheap, supply exceeds demand
Not applicable
Author

hi

i am using this exp;

=count({<products={'=sum(sales)<target'}>}products)

Not applicable
Author

Hi Gysbert,

thanks for the reply,

it value showing '2',but it should be 1,because for region'c' is only not reached the target.

any help

Not applicable
Author

sorry if i select products 'p1

Gysbert_Wassenaar

That's very interesting. It's showing 1 as result here based on the example data you posted.


talk is cheap, supply exceeds demand
timanshu
Creator III
Creator III

Hi Baru,

Can you elaborate your Query. As you said aggregation by region is giving count 0 . But  this should give the count.

robert_mika
Master III
Master III

Create an alternate state

Setting  - Document Properties-Alternate state—Add..

And then go to the textbox with the expression Gysbert has provided and choose from dropdown this State