Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gal_polak
Creator
Creator

Count if sum of one column equal to sum of another column

Hi,

Two things that i still don't find clear enough

1. is it possible to use "IF" inside the set expression of  an aggregation (i.e. count,sum..etc.) 
for example: count( if(date>today(),date))

2. i would like to count the Users.KEY in case the sum of WasLoginPotential equals to the sum of WasLoggedIn

for example i have this table:

1Users.KEYFactMonthlyLogins.MonthWasLoginPotentialWasLoggedIn
14367|5638Feb11
14367|5638Apr11
14367|5638Jun11
14367|5638Jan1-
14367|5638Mar1-
14367|5638May1-
14367|5638Jul1-
14367|5638Aug1-

 

what you would recommend to do? 

Labels (3)
1 Reply
Anil_Babu_Samineni

1) Definitely you can use it
2) I wold prefer this way

Count({<Users.KEY = {"=Sum(WasLoginPotential)=Sum(WasLoggedIn)"}>} Users.KEY)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful