Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Nora104
Partner - Creator
Partner - Creator

Can the formula (count when one of the conditions is met) not use the aggr function?

The formula is as follows, Stores that meet either SO_Qty>0 or SOH_Qty>0 are counted:

count(distinct AGGR(IF(SUM(SO_Qty)>0 or SUM(SOH_Qty)>0,Store_Name,),Store_Name))

Are there other formulas that can be written without the aggr function?

1 Solution

Accepted Solutions
MayilVahanan

Hi @Nora104 ,

Try like below

=Count({<StoreName= {"=SUM(SO_Qty)>0 or SUM(SOH_Qty)>0"}>}DISTINCT StoreName)

and also, you can reduce your formula like below

Sum(AGGR(IF(SUM(SO_Qty)>0 or SUM(SOH_Qty)>0,1),Store_Name))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

Hi @Nora104 ,

Try like below

=Count({<StoreName= {"=SUM(SO_Qty)>0 or SUM(SOH_Qty)>0"}>}DISTINCT StoreName)

and also, you can reduce your formula like below

Sum(AGGR(IF(SUM(SO_Qty)>0 or SUM(SOH_Qty)>0,1),Store_Name))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.