Skip to main content
Question

Keep only the highest value per user


Forum|alt.badge.img

Hi,

A users' progress is being tracked being creating new rows of data, with an incrementing counter in a column like so:

I want to only keep the rows with the highest counter value for each users (A, 5; B,3; etc). So only keep the highlighted rows. How can I do this in workbench?

Thanks!

2 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 4, 2017

Have a look at the StatisticsCalculator (group by user, the _max will have the required value).

Use output port SUMMARY.


Forum|alt.badge.img+1

@mvdorst, there are a number of ways you could do this, but I think the easiest is probably to use a StatisticsCalculator transformer - analyse the counter value/second column, and calculate the maximum, having also included a Group By clause on the name/first column.

Example workflow below:

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings