I want to include Last Year results in my list.
Im using this as my filter
[YearLY] = [Invoice].[Year] - 1
Now, how can i associate my data item to read from this?
My current data item is this
[Invoice].[Net Price]*[Invoice].[Quantity Shipped]
I duplicated that data item and called it LineTotalLY. How can i get it to only read last year?
Remove the filter and add a case statement in your LineTotalLY data item as
CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN [Invoice].[Net Price]*[Invoice].[Quantity Shipped]
ELSE 0
END
CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN total([Invoice].[Net Price]*[Invoice].[Quantity Shipped])
ELSE 0
END
I tried that on my LineTotalLY data item.
I made a list and put Return, LineTotal, LineTotalLY
But LineTotal and LineTotalLY are the same
Try:
total(CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN [Invoice].[Net Price]*[Invoice].[Quantity Shipped]
ELSE 0
END)