Subquery in data filter in Admin Tool — Oracle Analytics

Oracle Analytics Cloud and Server

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

Subquery in data filter in Admin Tool

Received Response
21
Views
4
Comments
mmajdana1
mmajdana1 Rank 6 - Analytics Lead

Hi.

does anyone know is it allowed to put subquery in data filter like this?

"ADW_TEST"."Costs"."Prod id" IN (SELECT  "ADW_TEST"."Products"."Prod id"  FROM  "ADW_TEST"."Products" WHERE    "ADW_TEST"."Products"."Prod category id" != 205 )

205 value is currently hardcoded, it will be changed by a variable later.

Answers

  • Joel
    Joel Rank 8 - Analytics Strategist

    You could create a 2nd Analysis which returns the "Prod Id" subquery, then apply it to your main Analysis in the filter as below:

    pastedImage_0.png

  • mmajdana1
    mmajdana1 Rank 6 - Analytics Lead

      @joel I want to apply this in RPD as a part of security.

  • mmajdana1 wrote: @joel I want to apply this in RPD as a part of security.

    Did you look at Row-Level Security (Data Filters) in the RPD? This is what they are there for, to filter data retrieved by business models / subject areas based on some conditions.

  • Joel
    Joel Rank 8 - Analytics Strategist

    Adding to @Gianni Ceresa's row level data filtering suggestion, you'd also need to add your PRODUCTS table as an additional Logical Table Source in your COSTS logical dimension. Once you've done that, then the data filtering should fit your use case.