Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm struggling to identify where the error is occurring in the following expression:
=Month(max(Date)) & ' vs ' & Month(max(Date)-31) & chr(10) & 'Spending' & chr(10) &
num(fabs($(vMonthSpending) - $(vLastMonthSpending) / $(vMonthSpending)), '(##.00%)')
I'm trying to get a text output of a selected month vs. last month's spending increases as a percentage.
Here is the expression for the Year vs. Last Year spending increase that executes successfully:
=max(Year) & ' vs ' & (max(Year)-1) & chr(10) & 'Spending' & chr(10) &
num(fabs($(v2017Spending) - $(v2016Spending) / $(v2017Spending)), '(##.00%)')
Any advice or assistance is much appreciated.
Best,
AR
Thanks for the suggestion - can you explain how to see if the variables hold data? I'm not seeing anything in the variable overview tab.
Try in steps.
($(v2017Spending) - $(v2016Spending)) / $(v2017Spending).. if this works,
please try
=num(fabs(
($(v2017Spending) - $(v2016Spending)) / $(v2017Spending)
)
, '(##.00%)')
hth
Sasi
Thanks for the answer, Sasi. However, that doesn't change the error message.
Try Changing
=count({<Month = {$(=max(Month)-31)}>} distinct Amount)
to
=count({<Month = {$(max(Month)-31)}>} distinct Amount)
Here's a screenshot of the error message. The red box is my area of concern.
Can you provide what each of your variables is calculating out to?
Can you share your script where you defined these variables?
vLastMonthSpending:
=count({<Month = {$(=max(Month)-31)}>} distinct Amount)
vMonthSpending:
=count({<Month = {$(=max(Month)-31)}>} distinct Amount)
Are you using LET or SET here? Can you use a text object and display one of the variables and see what it displays?
And what are the values that hold Month field or they numbers or Text chars like Jan, Feb, Mar.....etc.
May be you need to add some other expression inside your variables..
...was this resolved - I'm getting the same error.