Oracle Analytics Cloud and Server

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

Select Distinct on a join?

Received Response
41
Views
2
Comments
Rank 1 - Community Starter

Hi,

Here is the problem.

Fact Table - X contains dollar amounts, it joins to Dim - X table by RowID = RowID. In certain instances, the Dim - X table repeats the same RowID, because some of the other columns in Dim - X are different. In these certain instances, the dollar amounts from Fact - X are multiplied buy the number of repeated RowIDs in Dim - X.

Is there any way to work around this by putting a distinct on the Fact - X. Dollar amount column or somehow in the dimension.

Thanks

Answers

  • Rank 2 - Community Beginner

    could you possibly use a subquery?

    where your join condition would look like:

    inner join (select distinct f1,f2,f3... from secondTable) t2

    on fact.rowid=t2.rowid

  • Rank 6 - Analytics Lead

    If it is custom mapping then I would suggest to check group by clause or agg trans in your mapping.

    for any assistance : expect more detail query.

Welcome!

It looks like you're new here. Sign in or register to get started.