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
질문됨 일 년 전244회 조회
1개 답변
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
지원 엔지니어
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠