Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
CHRIS_Singa
Contributor III
Contributor III

Aggregation function with no filter allowed

Hello everyone,

I got a question about Aggr() Function.
How can I use the function {1} which allow no filter with the aggregation function.

Example :
Count(aggr(if(Country='USA', count( distinct Client)),Client))
How can I add {1} to allow no filter ?

Thank you for the feedback

Labels (7)
1 Solution

Accepted Solutions
CHRIS_Singa
Contributor III
Contributor III
Author

@BrunPierre  : I tried your script but still was not. And then, I tried the function below. Now the result is correct, no filter applied. Thank you 🙏 

 Count({1}aggr({1}if({1}Country='USA', count({1} distinct Client)),Client))

View solution in original post

4 Replies
BrunPierre
Partner - Master
Partner - Master

As below.

Count({1}aggr({1}if(Country='USA', count( distinct Client)),Client))

CHRIS_Singa
Contributor III
Contributor III
Author

Not working, Dimension like Month is still working @BrunPierre 

BrunPierre
Partner - Master
Partner - Master

Correction!

Count({1}aggr({1}if(Country='USA', count({1} distinct Client)),Client))

CHRIS_Singa
Contributor III
Contributor III
Author

@BrunPierre  : I tried your script but still was not. And then, I tried the function below. Now the result is correct, no filter applied. Thank you 🙏 

 Count({1}aggr({1}if({1}Country='USA', count({1} distinct Client)),Client))