periodOverPeriodPercentDifference / periodOverPeriodDifference cannot work with year

0

Using the same example from: https://aws.amazon.com/blogs/big-data/add-comparative-and-cumulative-date-time-calculations-in-amazon-quicksight/

I am able to replicate both Quarter and Month Partial QoQ QTD Sales and MoM MT Sales:

PartialQoQQTDSales=periodOverPeriodPercentDifference(sumif(Sales, {Order Date} <= addDateTime(dateDiff(truncDate("Q", ${DateParameter}), ${DateParameter}, "DD"), "DD", truncDate("Q", {Order Date}))), {Order Date}, QUARTER, 1)

PartialMoMMTDSales=periodOverPeriodPercentDifference(sumif(Sales, {Order Date} <= addDateTime(dateDiff(truncDate("MM", ${DateParameter}), ${DateParameter}, "DD"), "DD", truncDate("Q", {Order Date}))), {Order Date}, QUARTER, 1)

However, Year to Date Partial YoY YTD Sales would not produce the desired result with: PartialYoYYTDSales=periodOverPeriodPercentDifference(sumif(Sales, {Order Date} <= addDateTime(dateDiff(truncDate("YYYY", ${DateParameter}), ${DateParameter}, "DD"), "DD", truncDate("YYYY", {Order Date}))), {Order Date}, YEAR, 1)

any ideas what did I do wrong?

jw321
asked a year ago227 views
1 Answer
0

Hi there,

Thank you for posting the question and the detailed explanation. In context regarding periodOverPeriodPercentDifference, YEAR is also one of the valid granularity.

In order to assist you better a screen-share session would be needed. Can you please open a support case with AWS using the following link

AWS
SUPPORT ENGINEER
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions