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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

Aggr () inside if

Hi,
I am writing this expression

if (Product.Amount > 0 and aggr(count(distinct Product.SalesDates),Product) > 0, Product.Name)

then it works

but when i do

if (Product.Amount > 0 and aggr(count(distinct Product.SalesDates),Product) = 0, Product.Name)


then it does not work.


The data is available for the second expression also.


why?

12 Replies
pradosh_thakur
Master II
Master II

are you sure it has data ? because logically if there is no sales date there should be no amount sold . may be problem is with    Product.Amount > 0 . try remove that and check. Just a guess.


regards

Pradosh

Learning never stops.
jduluc12
Creator
Creator
Author

Product.Amount is balance which can be there becasue of previous transactions.

swuehl
MVP
MVP

IMO, 'it does not work' is not a good issue description.

To understand the issue, it's necessary that you add details about your data, model, context of the calculated dimension (other dimensions / expressions? ) and also importantly, about your expectation as user / developer (what you expect to see given the still-to-defined input and context) and the observed result.

Please add more details to make the issue resolving more efficient.

If possible, add sample data / a small sample Qlik application demonstrating your issue.