Skip to Content
avatar image
Former Member

SAP HANA Duplicate records after join

Hi all,

I am data modeling a ISH data model mixed with billing data.

After testing some results of the calculation view created, I am facing duplicate records.

Is there any way to avoid duplicate records after a join in the following example:

TABLE 1

Case1 100$

Case2 500$

TABLE 2

Case1 Mov1

Case1 Mov2

Case1 Mov3

Case2 Mov4

Case2 Mov5

With the Table 1 I get the billing per case, and after the join with the movemnets details of each case I get the following result

RESULT

Case1 Mov1 100$

Case1 Mov2 100$

Case1 Mov3 100$

Case2 Mov4 500$

Case2 Mov5 500$

So, in reporting, I get for Case1 a total of 300$ and for Case2 1000$

Please note, that this is only example, there could be a lot of fields involved in Table2.

Kind regards

Add comment
10|10000 characters needed characters exceeded

  • The behavior you describe is normal. The question is, what you wanna reach with your join with the join condition on the case column? What do you expect as result?

  • Former Member

    Many thanks for your feedback.

    The result I am expecting is the following:

    RESULT

    Case1 Mov1 100$

    Case1 Mov2 100$

    Case1 Mov3 100$

    Case2 Mov4 500$

    Case2 Mov5 500$

    Expecting for Case1 a total of 100$ and for Case2 500$

    Kind regards

  • Get RSS Feed

1 Answer

  • May 21 at 10:00 PM

    Hi Sergio,

    You can switch the aggregation of this measure to MAX or MIN.

    That way, whenever it gets aggregated, it would not add up.

    Regards,

    Shyam

    Add comment
    10|10000 characters needed characters exceeded