Forum Discussion
Comparing Last Year Sales Values
Hi all,
Been working for the last day or so on producing some projection/tracking reports for sales. I've managed to get most rows of the matrix calculating what I want but am getting stuck when it comes to comparing with last year values. I'm not sure if the problem is due to me using fiscal years and matching data up based on that. I'll post a picture of the matrix in its current state and if any particular column/measure is needed to help with the problem let me know!
Hello,
please provide us the formula how you calculated SumLYLineValue.
Did you use Sameperiodlastyear or DateAdd(DateTable;-1;Year)?
14 Replies
- FloriankxSolution Sage
Hello,
please provide us the formula how you calculated SumLYLineValue.
Did you use Sameperiodlastyear or DateAdd(DateTable;-1;Year)?
- JoshSHardscapeHelper I
Hi, thanks for the response.
This measure was calculated using the following:
SumLineValue = SUM('Sage Data'[Line Value])
SumLYLineValue = CALCULATE([SumLineValue],SAMEPERIODLASTYEAR('Sage Data'[Order Date].[Date]))
Would the DateAdd command be more appropriate or is it functionally identical?
Thanks,
- FloriankxSolution Sage
Hello,
the functions are similar.
DateAdd is great if you want to move back or forward day or months. In your case Sameperiodlastyear is great.
Do you have a contigous date table?
In such cases it's usually the best to have a separate date table which you relate to your date colum.
Then you calculate with Sameperiodlastyear(DateTable[Date]) and you put the Date data to your Pivot.
I'm not sure but this may cause your trouble.