Self join on Fact Table using alias — Oracle Analytics

Oracle Analytics Cloud and Server

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

Self join on Fact Table using alias

Received Response
1
Views
1
Comments
2981486
2981486 Rank 3 - Community Apprentice

Hello,

I have a "Sales Fact table" with Transaction # and Original Transaction #.

I created a new Alias for the same fact table as "Sales Original Fact Table", which will self join to the "Sales Fact Table" on Transaction # = Original Transaction #.

What is the best way to model this in the rpd? Should I use both "Sales Fact Table" and "Sales Original Fact Table" in the same Logical Table Source? Or should I put them into separate Table Sources?

Please note that I only want the second table (Sales Original Fact Table) to be included in the query when the user includes one of its columns in the analysis in OBIEE. When I put them in the same Logical Table Source, both tables are included in the query no matter what, which is not what I want.

Thanks,

Joao

Answers

  • 2981486
    2981486 Rank 3 - Community Apprentice

    Answering my own question, I have put both in the same Logical Table Source. What tells if the "Original Sales Transaction" alias table will be included in the query is the direction of the join arrow. As soon as I changed it, the alias table did not get included when not necessary.

    Joao