Skip to Content
author's profile photo Former Member
Former Member

How to get distinct values from table in calculation view?

Hi ,

I have a scenario in which there are two tables.



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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 06, 2014 at 06:53 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Khalid,

      In your scenario,

      It looks like you have detailed table and summary table, however there is one column that makes the detail table as detail for example:

      summary Table = ST , Detail Table = DT


      Prd_Id total cost

      1234 $150


      Prod_ID pro_Detail Cost_per_D_Prod

      1234 Pro_1 $100

      1234 Pro_2 $50

      This is I suppose your structure in this case it's either when you join the 2 tables don't bring the column that gives details just bring all other columns and you should be fine,

      if you have to have the details about product you will need to create another aggregation where you use the detail_Pro and give it different name than the other measure.

      hope this answer your question.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.