Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone.
I created a master calendar which contains CurYTDFlag and LastYTDFlag.
I have a field
If(([status] = 'blabla' or [status] ='έγινε ολοκλήρωση ερωτηματολογίου' or
[status] = 'blabla' and Len(unitnumber)=12 ,'1', '0') as donation
and so i want to get CYTD-LYTD count of donations.
I've thought to do this but it doesn't work
count({$< CurYTDFlag={1}, Year=, Month= >}
aimodotisi='1')
-
count({$< LastYTDFlag={1}, Year=, Month= >}
aimodotisi='1')
Other solutions I have found include an AutoCalendar. How do I involve this?
Help!
Thanks ,
Ioanna
Hello,
I think you got it almost right.
Probably try changing this:
If(([status] = 'blabla' or [status] ='έγινε ολοκλήρωση ερωτηματολογίου' or
[status] = 'blabla' and Len(unitnumber)=12 ,'1', '0') as donation
count({$< CurYTDFlag={1}, Year=, Month= >}
aimodotisi='1')
-
count({$< LastYTDFlag={1}, Year=, Month= >}
aimodotisi='1')
to this:
If(([status] = 'blabla' or [status] ='έγινε ολοκλήρωση ερωτηματολογίου' or
[status] = 'blabla' and Len(unitnumber)=12 ,1,0) as donation // No ''' signs
Sum({$< CurYTDFlag={1}, Year=, Month= >} donation)-
Sum({$< LastYTDFlag={1}, Year=, Month= >} donation)
I hope that helps!
Kind regards,
S.T.
It only worked when I did
count({$< CurYTDFlag={1}, Year=, Month= >} donation=1)- count({$< LastYTDFlag={1}, Year=, Month= >} donation=1)
and put count instead of sum.
Do you think this is correct?
Many thanks!
Hi Ioanna,
It's weird that count({$< CurYTDFlag={1}, Year=, Month= >} donation=1) works but this:
Sum({$< CurYTDFlag={1}, Year=, Month= >} donation) doesn't. This can probably be explained by the data model.
Still if you want to use Count, you should do it like this to ensure it will be working with any selections:
count({$< CurYTDFlag={1}, Year=, Month=,donation={1} >} donation)
I hope that helps!
Regards,
S.T.
Your help means a lot!
😁