Oracle Analytics Cloud and Server

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

Display not null quarter value as new column

Received Response
31
Views
7
Comments
Avinash Pentyala
Avinash Pentyala Rank 5 - Community Champion

Hi,

I have a report showing a pivot table where the values are displayed by Quarter. I have to display last Quater value which is not null as a new column value as below

sample data is updated!

pastedImage_0.png

Regards,

Answers

  • Is Null really NULL or it's no value at all?

    Aggregating using LAST (not SUM etc. but LAST) and assuming your NULL is no value you will get your values.

  • Avinash Pentyala
    Avinash Pentyala Rank 5 - Community Champion

    Yes, No value. can you please elaborate your comments.

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    LAST() gives you the most recent data point at the intersection of your selected dimensions (time being mandatory).  If you have a NULL at an intersection and it's the most recent then that's what's going to be returned - hence Gianni asking his question.  He's managing your expectations

  • Avinash Pentyala
    Avinash Pentyala Rank 5 - Community Champion

    I have tried as below in edit formula but not working, troughing a syntax error 

    MAX(Value) KEEP ( DENSE_RANK LAST ORDER BY QTR)

  • Avinash Pentyala wrote:I have tried as below in edit formula but not working, troughing a syntax error  MAX(Value) KEEP ( DENSE_RANK LAST ORDER BY QTR)

    Did you read what as been posted above? Where did you see something like the formula you tried?

    The formula isn't SQL, it isn't something you are writing for your database, it's LSQL : logical SQL. It's a language that the BI Server speaks, so you need to use a syntax supported by the BI Server and not randomly put together pieces of SQL ...

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    Gianni has answered, but - injecting SQL into this mix is not the way to go.  You need to build a logical column that evaluates the LAST() based on the chronological dimension you've already got set up.

  • [Deleted User]
    [Deleted User] Rank 10 - Analytics Guru

    6 responses...let me drive home the point:

    Aggregation rule = LAST! Done. Over. Finished.