Forum Discussion

ElektroCED's avatar
ElektroCED
Regular Visitor
4 years ago

Problems with Time Comparison

Hello everyone, I'm having a problem with time comparisons using the following formulas (indicated by a forum user):


YTDmeasure= TOTALYTD(SUM(Table[Total Sales]), Table[Dates])

PYTDmeasure= CALCULATE(YTDmeasure, PARALLELPERIOD(Table[Dates], -12, Months))

Comparison= DIVIDE(YTDmeasure-PYTDmeasure, PYTDmeasure)

 

(Obviously I insert the values ​​of my table and I also added a comparison between this year and two years ago)

 

In general they work very well, but in some cases (like the one below) they report incorrect values:

 

CY = Current Year; PY = Previous Year; 2PY = comparison with two years ago; YTD = Year to Date

 

The following values, for example, are correct (I report them in order to have a further feedback):

 

 

N.b: all comparisons work up to today's date.


Thanks a lot to those who want to try to solve the problem and have a good day.

 

Gabriele

 

3 Replies