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

problem Aggr count

hi everybody

When I want to aggreger this table by Month, I have no result

$(Vday) = 19 (It is a varialbe that I enter)

thanks

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Count(DISTINCT Aggr(if(Date_Connexion>=date(DateFinMois-$(Vday)+1),Contrat), Mois, Contrat, Date_Connexion))

View solution in original post

6 Replies
sunny_talwar

May be try this

Sum(Aggr(if(Date_Connexion>=date(DateFinMois-$(Vday)+1),1,0), Mois, Contrat, Date_Connexion))

Anonymous
Not applicable
Author

no brother It does not work, I want to count the number of contracts per month


Sum(Aggr(if(Date_Connexion>=date(DateFinMois-$(Vday)+1),count(distinct Contrat),0), Mois, Contrat, Date_Connexion))

You can choose vday = 20

i must have 2 contrat in Mars = 1001,1000


sunny_talwar

May be this:

Count(DISTINCT Aggr(if(Date_Connexion>=date(DateFinMois-$(Vday)+1),Contrat), Mois, Contrat, Date_Connexion))

Anonymous
Not applicable
Author

Thank you brother it worked, can i use it in a set analysis ?

sunny_talwar

You might have to make modifications in the script to make it work using set analysis (I am not 100% sure it will work though)

Anonymous
Not applicable
Author

Thank you brother