1 of 1 people found this helpful
Hi here is one way to do it
First create a parameter (I called it Enter year Month for analysis)
Next determine if the sales are to be included in the YTD calcualtion
if year([Order Date]) = YEAR([Enter year month for analysis])
And DATETRUNC('dayofyear',[Order Date]) <= DATETRUNC('dayofyear',[Enter year month for analysis])
then [Sales] else 0 end
Finally do a total on the calculation
WINDOW_SUM(sum([Sales to include in YTD]))
Let me know if this helped
It worked out! Thanks a lot!
The second calculation wasn't necessary in our case, but the first we did need;)!
Again, thanks a lot!
You are welcome
Glad to help out