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
質問済み 1年前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
サポートエンジニア
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ