We have a workflow that is using a sample tool, which is setup like the screenshot below. We are trying to get 3% of records for the column we've grouped by. However, the issue is that some 3% of some claim_ids is about .03 - because of this, no records are returned. We have a solution in place that in essence find those claim IDs and takes 1 record for each claim_id, but it is quite a bit of a workaround. It would be far simpler if we could just tell the sample tool to round up, or to take at least 1 record per claim_id. Is there any way to do something like that?
Solved! Go to Solution.
Hey @cpet13,
Thanks for teaching me something new! I had no idea the Sample tool would drop rows in when they are under the %. Below is the simplest solution I can think of. If you calculate the number of rows per CLAIM_ID, then you can easily identify which rows will be dropped in your sample tool. I used a filter to keep 3% of the rows that are above the threshold and keep 1 row for any Claim_ID below the threshold and union them together:
Like most problems, there are many ways to solve this one but this was the easiest way I could think of!