# YoY WoW Calculation

I am currently working on a calculation that takes the YoY %, then takes the WoW in BPS. I am able to get the YoY % using a periodoverperiodpercent calculated field but can’t use it in nested function to get the WoW. What is the best way to go about this?

@Matthew_Payne, can you clarify your comment about nesting function to get the WoW. Periodoverperiodpercent functions have period argument that can take values such as `YEAR`, `QUARTER`, `MONTH`, `WEEK`, `DAY`, `HOUR`, `MINUTE`, and `SECONDS`, so you can create a calculated column for year and another one for week.

So I have this calculation to get the YoY%, periodOverPeriodPercentDifference(sum({gms_retail}),{grouping_period_day},DAY,364)

I then need to get the WoW for the calculation above, in BPS, but the calculation below gives me a nesting error.
periodOverPeriodPercentDifference(sum({gms_retail}),{grouping_period_day},DAY,7)

@Matthew_Payne I have created two periodoverperiodpercentdifference calculations, one for week and one for year as below and able to view both in table. So I am not following the ask of nesting functions to get week values.
WK - periodOverPeriodPercentDifference(sum(Sales),{Order Date},DAY,7)
YR - periodOverPeriodPercentDifference(sum(Sales),{Order Date},DAY,365)

I was able to figure it out, First Year over Year to get the YoY %
YR - periodOverPeriodPercentDifference(sum(Sales),{Order Date},DAY,365)
, then
WoW periodOverPeriodPercentDifference(Sales,{Order Date},DAY,7)
to get the YoY WoW calculation. I had a SUM before the Sales in WoW calculation which needed to removed.