Skip to main content

Imagine I have two tables

 

  • Cases
    • Case ID
    • Customer
  • Activities
    • Case ID
    • Activity
    • Event Time

 

I would like to get the earliest "Upload" activity event time across all cases for a given customer.

 

It is easy for me to get the earliest "Upload" activity for each Case with:

 

PU_FIRST(Cases, Activities.Eventtime, Activities.Activity = 'Upload)

 

But this returns a row for every case.

 

I cannot figure out how to get the first of all these results. I tried domain tables, but couldn't figure out how to set it up.

 

Any thoughts?

Hi Matt,

Just wanted to know clearly, what exactly are you trying achieve by getting single value?

 


Please try the following

PU_FIRST(DOMAIN_TABLE(Activities.Activity), Activities.Eventtime, Activities.Activity = 'Upload’)

With this you’ll get the first Eventime per Activity and not per Case.


By having customer name as Dimension and MIN(PU_FIRST(Cases, Activities.Eventtime, Activities.Activity = 'Upload)) will probably help you to get the desired result.


Reply