Oracle Analytics Cloud and Server

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

% Change YoY or QoQ in Pivot Table?

Received Response
21
Views
1
Comments
mrmmickle1
mrmmickle1 Rank 4 - Community Specialist

Is it possible to do a QoQ or YoY % change in a pivot table.  I have a case statement that filters on a specific time period based on the quarter...

i.e.

2019 Q3 = 2018 Q4, 2019 Q2, 2019 Q3

2019 Q4 = 2018 Q4, 2019 Q3, 2019 Q4

I would like to add a calculated field at the end of the table for YoY % Change or QoQ % Change.... is this possible?

pastedImage_0.png

I am trying to avoid hardcoding criteria in a column using a filter statement.... i.e. FILTER( EE Headcount USING Quarter Name = YYYY QQ)  .... I want it to be dynamic so I don't have to keep changing the criteria.  I have case statements in columns that are dynamic that seem to work but they are bogging down the dashboard

Here is my current time criteria in the query:

(("Gregorian Calendar"."Quarter Name" = CASE WHEN cast(substring(ValueOf("CURRENT_QUARTER_OBIA") FROM 8 for 1) as Integer) = 1 THEN Cast(Cast(Valueof("CURRENT_YEAR_OBIA") AS Integer)-1 AS char(4))||' Q 3' WHEN Cast(substring(ValueOf("CURRENT_QUARTER_OBIA") FROM 8 for 1) as integer) = 2 THEN Cast(Cast(Valueof("CURRENT_YEAR_OBIA") AS Integer)-1 AS char(4))||' Q 4' WHEN cast(substring(ValueOf("CURRENT_QUARTER_OBIA") FROM 8 for 1) as integer) = 3 THEN Cast(Valueof("CURRENT_YEAR_OBIA") AS char)||' Q 1' ELSE Cast(Valueof("CURRENT_YEAR_OBIA") AS char(4))||' Q 2' END) OR ("Gregorian Calendar"."Quarter Name" = Cast(Cast(Valueof("CURRENT_YEAR_OBIA") AS Integer)-1 AS char(4))||' Q 4' ) OR ("Gregorian Calendar"."Quarter Name" = ValueOf("PREVIOUS_QUARTER_OBIA"))))

Answers

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

    Inside a pivot you can use the $ notation which simply references items / dimension members by their positional value. $1 ist the first, $2 the second and so on.

    pastedImage_0.png

    I won't even comment on that CASE...WHEN O_o