Oracle Analytics Cloud and Server

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

Decode function in logical query (Source: Essbasase) Error:[nQSError: 96002]

Received Response
21
Views
5
Comments
SaQ-Orcl
SaQ-Orcl Rank 4 - Community Specialist

Hi,

Does any one faced below issue while using Decode function in report where subject area's source is Essbase ?

Function :  EVALUATE('DECODE(%1,%2,%3)' as char(20),"FYYear"."G2,Year",'CY2017','Test ')

Error: [nQSError: 96002] Essbase Error: Unknown Member DECODE used in query (HY000

Is any alternate of decode in MDX query(Seems Decode is not supported by essbase and case statement will not fulfil my requirement) ?

Thanks

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    MDX does not understand or know "DECODE". It only supports CASE.

    https://docs.microsoft.com/en-us/sql/mdx/mdx-function-reference-mdx

  • SaQ-Orcl
    SaQ-Orcl Rank 4 - Community Specialist

    Thanks Christian for reply.

    My requirement is something like below.

    1) I need to display data from column 'DX 16FX'  in year 2017.

    2) In 2018 I need to display data from column 'DX 17FX' which will be crated and populated in end of year.

    3) So if I will use case then it will trigger error like no column found.

    4) I have done this using presentation variable in OBIEE report, but I am facing little challenge while implementing this in Data model.

    Thanks

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner
    2736334 wrote:1) I need to display data from column 'DX 16FX' in year 2017.2) In 2018 I need to display data from column 'DX 17FX' which will be crated and populated in end of year.3) So if I will use case then it will trigger error like no column found.

    In point "2)" you have all you need to even handle that in the CASE. Simply check the year of the sysdate and if that year isn't yet fully over...don't show anything or show a Default text like 'Invalid Year selected# or the likes.

    I'm sure your problem has many more alternative solutions but with your input and not knowing your cube outline it's not really easy to tell you "Do XYZ instead".

  • SaQ-Orcl
    SaQ-Orcl Rank 4 - Community Specialist

    Thanks Christian for reply.

    I am using data model for the Mobile App where case serve my purpose when I use oracle DB as source in rpd but not in essbase source.(User does not have provision to play with date. so next year column should rename or pick newly created column).

    I have implemented in OBIEE report however little challenge while using in BI-MAD.( I am doing work around to achieve this).

    Will update my finding in this ticket.

    Thanks,

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Thanks