periodOverPeriodPercentDifference not working for more than one column


I have added two YoY value to my pivot table: a spend YoY and a CPC YoY. They are very similar and I am having an issue with the CPC YoY.
They have the following calculation:

spend YoY:
periodOverPeriodPercentDifference(sum({Dollar Spend}),{Parse NY}, YEAR, 1)

periodOverPeriodPercentDifference(({Avg CPC}),{Parse NY}, YEAR, 1)

The only difference is that I am doing a sum of my spend for spend YoY and I am not for the CPC. I am not doing this for CPC because I am using the metric Avg CPC which is: sum({Spend & Clicks Tracked})/sum(clicks) so it is already a sum and I cannot nest Sums.

I am getting the right data for the first YoY comparison but for the second one (2023), I get a really weird number.

(data has been hidden but the important CPC numbers are there)

I am assuming it is because I don’t have sum in the CPC YoY calculated field.
Is there a workaround to make this work?

Many thanks

Hi @loupelou,

Welcome to the QuickSight Community and thanks for posting your question.

Am I right in understanding that the 2022 value displayed, “39.1%”, is correct for the YoY CPC, but the number you’re querying is the “241.2%” value for 2023?

If you could post some obfuscated/sample data then I may be able to reproduce the calculations and look at the options.


Hello @loupelou, are you able to follow-up with the information that @abacon requested? With a little more detail regarding your data we should be able to help resolve the issue you are facing. If we do not hear back from you in 3 days, I will go ahead and archive this topic. Thank you!

Hello @loupelou, since we have not heard back from you, I will archive this topic. If you still need assistance with this, please post a new question in the community and link this topic. That will ensure you are at the top of the priority list for a response from one of our QuickSight experts. Thank you!