Performance issues in using multiple Values in Table visualization for YoY Calculation

The periodOverPeriod funcitons are Table Calculations, which means you need to include the date field in your visual (which is why you are also doing the rank filter to hide all the other periods). It also means these are not materialized in SPICE even though you put them in the dataset because they are aggregated fields.

You can calculate the PoP calcs another way which doesnt use table calculations and hence you wont need that Rank filter. I think this will perform faster.

For example, to do a YoY comparison at the month level (from this other article Period Over Period and Other Date Comparison Calculations (YoY, MoM, YTD, Rolling 90 days, etc)) :

(the ${AsOfDate} is a parameter in this example, but it could be another calc like maxOver({your date field}, [], PRE_AGG) to get the most recent date value)

This month (aka Month to Date, MTD):

ifelse(dateDiff({order_date},${AsOfDate},"MM") = 0, sales, 0)

Same month last year:

ifelse(dateDiff({order_date},${AsOfDate},"MM") = 12, sales, 0)

Then your YoY is:
(sum({Same month last year})-sum({This month})) / sum({Same month last year})

These wont be able to get materialized either because no matter if you use a parameter like AsOfDate or the maxOver calc to be your ‘end date’, both of those are going to prevent the calc from being materialized. It would have to be a hard-coded end date, or a real field from your data - like you could add a column in the actual data source that has the max reporting date listed on every row. Still, I even without being materialized you might have more success with this method. If still not working then I would try adding that max reporting date to the data source which will for sure make this faster.