Oracle Analytics Cloud and Server

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

YTD Calculation on OBIEE 12c

Received Response
292
Views
3
Comments
User_HXMBL
User_HXMBL Rank 1 - Community Starter

I have a logical column in my rpd that should holds the YTD value. When i display this column in my report, it shows the value from the previous years to date, while I only require only the value from the beginning of the year specified. E.g. I have data from 2015 to date, and i want YTD. The value provided is a consolidation of 2015 Jan and Feb, 2016 Jan and Feb, 2017 Jan and Feb and 2015 Jan and Feb. The expression on my logical column is ToDate(measure,level)

Product version: OBIEE 12.2.1.1.0

Answers

  • Syed Misbauddin-Support-Oracle
    Syed Misbauddin-Support-Oracle Rank 3 - Community Apprentice

    Please try with below.

    TIMESTAMPADD(SQL_TSI_DAY, -1*(DAYOFYEAR(CURRENT_DATE )-1) , CURRENT_DATE )

  • Christian Berg-0racle
    Christian Berg-0racle Rank 10 - Analytics Guru

    @3146354 that's not a year-to-date ("YTD") calculation...that's a TIMESTAMPADD

  • We will probably never see @3236706 again ...

    But it sounds like a badly configured time hierarchy with issues in the keys and that's why the YTD functions can't make a difference between months of different years.