Microsoft Office Tutorials and References
In Depth Information
FIguRE 7-40 Prior Year simple calculations.
When you want to calculate the year-to-date of the prior year because, typically, you want to
compare it with the current year-to-date measure, you have to mix the two techniques. Instead
of passing the OrderDate[Date] parameter to SAMEPERIODLASTYEAR, which corresponds to
the list of dates that are active in the current filter context, you can use the DATESYTD function
to make a transformation of these dates, defining the year-to-date group first. However, you
might also invert the order of these calls. In fact, the two following definitions of PyYtdLineTotal
are equivalent:
PyYtdLineTotal = CALCULATE( SUM( SalesOrderDetail[LineTotal] ),
PyYtdLineTotal = CALCULATE( SUM( SalesOrderDetail[LineTotal] ),
You can see the results of the PyYtdLineTotal in Figure 7-41. The values of YtdLineTotal are
reported for PyYtdLineTotal shifted by one year. In the same screen, you can also see the
FiscalYtdLineTotal measure that you saw at the end of the previous section: the horizontal
lines between Q2 and Q3 in that column highlight the points at which the year-to-date
calculation restarts.
FIguRE 7-41 The year-to-date calculation for Prior Year and Fiscal Year.
Search JabSto ::

Custom Search