Skip to main content
Solved

How Does Group By Work in this Scenario?

  • 5 June 2024
  • 3 replies
  • 20 views

Scenario: There are multiple Cases associated to a Company Record. 

Created Date = Created Date of the Case

GSID (Case) = the GSID of the case records

GSID (Company) = the GSID of the company records. 

 

Will the results only show the GSID (Case) for the case that has the Maximum created date? OR will it show all cases?

 

Note: doing this in data designer. 

3 replies

Userlevel 5
Badge +5

Hi @taylorfriss !
You can’t use non-aggregated data with aggregated data, if you try to save that, it will give you an error 

If what you are trying to do is identify the newest Case by Company you have to:
1: Bring in your initial dataset with the fields that you need
2: Do a transform grouping by Company GSID and the Max of the created date
3: Last, do an inner Join of 1 and 2, using both the Company GSID and date as identifiers

I recorded a quick walkthrough, hope this helps 😊
 


 

Userlevel 1

Thank you! I thought it would give me an error too, but it didn’t. I didn’t validate to see whether there was only one row for the aggregation though. I guess I can go that route to validate.

 

I went the route you recommended to get what I needed though. Thank you! 

Userlevel 5
Badge +5

Great news! Happy to help 😃

Reply