Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i am trying to get count of previous year and previous month using setanalysis to variables, where it gives me zero, even though i have value for it.
in front end
count({<client_id={'15'},DateType = {'invitation'},Month_Num = {"$(=num(Month(AddMonths(today(),-1)),'00'))"},Year = {"$(=year(max(CanonicalDate))-1)"} >}invitation_id)
results in 2334
In script with setanalysis and variables:
what i tried:
let var3 = 'count({<client_id={''13''},DateType = {''invitation''},Month_Num = {"$' &'(=num(Month(AddMonths(today(),-1)),'00'))"},Year = {"$' &'(=year(max(CanonicalDate))-1)"} >}invitation_id)'; // this gives error
let var1 = 'count({<client_id={''13''},DateType = {''accessed''},Month_Num = {"$' &'(=num(Month(AddMonths(today(),-1))))"},Year = {"$' &'(=year(max(CanonicalDate))-1)"} >}invitation_id)';
let var2 = 'count({<client_id={''13''},DateType = {''accessed''},Month_Num = {"$' &'($' &'(=num(Month(AddMonths(today(),-1)))))},Year = {"$' &'($' &'(=year(max(CanonicalDate))-1))"} >}invitation_id)';
all this gives me zero in front end.
$(var1) results zero
$(var2) results zero
What i am missing here? Please help me on this.
try this
($(var1)
or
('$(var1)'
or
'$(var1)'
Hi Chanty,
All gives me empty
try to remove single quotes in expression and try once.
let var3 = count({<client_id={''13''},DateType = {''invitation''},Month_Num = {"$' &'(=num(Month(AddMonths(today(),-1)),'00'))"},Year = {"$' &'(=year(max(CanonicalDate))-1)"} >}invitation_id); // this gives error
let var1 = count({<client_id={''13''},DateType = {''accessed''},Month_Num = {"$' &'(=num(Month(AddMonths(today(),-1))))"},Year = {"$' &'(=year(max(CanonicalDate))-1)"} >}invitation_id);
let var2 =count({<client_id={''13''},DateType = {''accessed''},Month_Num = {"$' &'($' &'(=num(Month(AddMonths(today(),-1)))))},Year = {"$' &'($' &'(=year(max(CanonicalDate))-1))"} >}invitation_id);
This gives me Unknown Error. I am not able to load script.
try this
$(=var1) or simply var1
Try Set instead of Let
Hi Supriya,
Try this
var1 (without any $ ())