Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am using the below expression and its not working...can anybody tell me what's wrong with that
sum({$<Status_FA={'A'},Month_No={$(var_month)}>}Revenue)-sum({$<Status_FA={'A'},Month_No={$(var_month)}>}Discount)
where var_month is the variable which is assigned the value as field Month_No
Month_No is in date format.
Please help me
try "" around the variable name
"$(var_month)"
try debugging your set analysis expression (thanks to John Witherspoon)
"
For debugging set analysis, make a chart that has your set analysis expression as the first chart expression, but do NOT label the expression, and do NOT supply a caption for the chart. The caption and column heading will then show your expression. One of them (I forget which) shows the expression just like you wrote it. One of them shows it after the dollar sign substitution has taken place. Comparing the two will very often let you know what's going wrong, or at least WHERE it is going wrong.
"
Thanks Sudeep
using " " around $(var_month) is making it as string and again it's not working
Hi Anuj,
I think the issue is because of formatting. What is the format of var_month and Month_No is both values are in same format? If not then convert to the same format.
If your Month_No column has 1 to 12 and var_month has one value of 1 to 12, then this works.
sum({$<Status_FA={'A'},Month_No={$(var_month)}>}Revenue)-sum({$<Status_FA={'A'},Month_No={$(var_month)}>}Discount)
Regards,
Jagan.
try $(=var_month)
regards,
MT
Hi Jagan,
Yes both Month_No and var_month are in same format which is date.
HI,
Try this
sum({$<Status_FA={'A'},Month_No={'$(=var_month)'}>}Revenue)-sum({$<Status_FA={'A'},Month_No={'$(=var_month)'}>}Discount)
Regards,
Jagan.
Hi,
How you created the field Month_No i.e., using Month(DateField)?
And how you assigned value to the variable using month function or something els?
Month_No is just the name of the field having values as Date type.
for assigning value to the variable go to Settings->Document Properties->Variables
and there you can assign any constant value or field value.