Calculating YTD

0

Assume i have below dataset

Brand Date Revenue Brand A 1/1/2023 30 Brand B 2/1/2023 50 Brand C 3/1/2023 60

I am trying to calculate YTD value which is Year to Date, on Jan 2023 it should be 30, Feb 2023 should be (Jan 2023 + Feb 2023 ) which should be 80, and March 2023 (Jan+Feb+Mar) should 30+50+60

Now, I need to show a matrix using Brand as rows, Month Year as columns and YTD Value as Values

To calculate YTD_revenue, I used "periodToDateSumOverTime(sum({price_times_quantity}),{receipt_date_formatted}, YEAR)" as a calculated field, but it's giving me different subtotal and total even if I chose one brand.

Yasha
질문됨 일 년 전350회 조회
1개 답변
0

Hi Yasha.

You can accomplish that using Period functions. Please see the following blog post (use case 2) for a sample implementation.

I hope this helps. (if so, please accept my aswer)

profile pictureAWS
전문가
답변함 일 년 전

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

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

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

관련 콘텐츠