First, thank you for your time!
I have been struggling with creating a previous month calculation for a little while and thought I should pose to the Tableau Forum before I lose my mind!
On the attached, I have calculated the RC Utilization percentage for the Current Month (based off my parameter, "Curren Month"). This percentage is calculated by taking the Reason Codes that do not = "#" / Total Reason Codes....this was pretty simple to create.
However, when I tried to calculate what the utilization would be for the previous month (June 2016 in this example) I'm really struggling. I thought I could add something like the following:
However, that doesn't work. Any ideas on how to fix?
Thanks for your time!
if datediff('year',[Order Date],[date1])=1 then sum[Sales] else 0 end
Date1 is the parameter.