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
Where are you getting this error? in Text box or while reloading? Can you share a snapshot?
Yours looked fine but you could try...................
=Month(max(Date)) & ' vs ' & Month(AddMonths(Monthstart(max(Date)),-1)) & chr(10) & 'Spending' & chr(10) &
num(fabs($(vMonthSpending) - $(vLastMonthSpending) / $(vMonthSpending)), '(##.00%)')
on the last part try removing the quotes, and putting the % at the end with & '%'
Hey Wallo,
Just gave this a try and I'm still getting the same error readout. Thanks for the suggestion, but I'm still not sure what the issue is.
Can you share a sample app?
You could try
=Month(max(Date)) & ' vs ' & Month(AddMonths(Monthstart(max(Date)),-1)) & chr(10) & 'Spending' & chr(10) & '(' &
num(fabs($(vMonthSpending) - $(vLastMonthSpending) / $(vMonthSpending)), '##.00%') & ')'
Also try checking your variable expressions. It's possible you're missing something in one of them and the error is occurring during the dollar sign expansion on execution of the expression.
Here is the variable script:
vLastMonthSpending:
=count({<Month = {$(=max(Month)-31)}>} distinct Amount)
vMonthSpending:
=count({<Month = {$(=max(Month)-31)}>} distinct Amount)
When you check your variables are they holding any data? Use Ctrl+Alt+V and see what values you can see for these variables? Can you share a sample if possible that has this issue?