Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to calculate YTD for current Year and YTD Month Ago for Current Year

Received Response
154
Views
1
Comments
User_F4K7G
User_F4K7G Rank 1 - Community Starter

Hello,

I am showing Year, Month and Customer Counts in report. My requirement is to calculate Current year YTD and Current YTD Month Ago and get the difference or growth on these measures. So I am using

TODATE(Customer Counts, Dimension Date.Dim Date.Year)

for current YTD which is giving intended results. Now I want to calculate YTD month ago for same year and I am using

AGO(TODATE(Customer Counts, Dimension Date.Dim Date.Year), Dimension Date.Dim Date.Month, 1)

which is giving error of [nQSError: 22044] Nesting of AGO or TODATE functions with differing level arguments is not supported.

How to achieve this calculation.

Help would be appreciated.

Thank you.

Answers

  • User_F4K7G
    User_F4K7G Rank 1 - Community Starter

    Hi all, I resolved it by subtracting current month from year to date which gave me required results.


    Thank you.