Skip to Content
0
Former Member
Nov 06, 2014 at 06:44 AM

How to get distinct values from table in calculation view?

3847 Views

Hi ,

I have a scenario in which there are two tables.

1. MPM_PROD_EVENTS

2. MPM_EVENT_MAP

MPM_PROD_EVENTS has many events with its effective durations.

MPM_EVENT_MAP contains Parent and child Events associations.

Suppose In MAP table I have association as

Parent Event Child Event

51 10

51 11

MPM_EVENT table has entries as:

Event ID Duration

51 100

Now my requirement is that I want only those events from EVENT table which are present as Parent_Event in MAP table.

On doing left join between Map and Event table ,

I am getting Records as :

Parent ID Duration

51 100

51 100

But Duration of 51 is 100 only.On aggregating this , It will make duration of event 51 as 200.

To solve this problem I need to get distinct values of parent id from MAP tables.

Same example is there in tmp.oee.test/test_events in VS3.

Please check and reply.

Thanks and Regards,

Tarun Rawal