Skip to main content
Solved

Group by Address and create min max attributes

  • July 22, 2016
  • 2 replies
  • 107 views

Forum|alt.badge.img

I'm hoping someone could help me figure out the best way to group a dataset by address and create min/max attributes to use later in the workspace.

I have multiples of same address(es) with policy effective and expiration dates

I've used aggregator to successfully group and create a count (so I know how many of same address are in the dataset)

What I want to do also is create a min effective date and max expiration date for each address and somehow calculate the time between these dates or at least determine if it is >3 years.

Appreciate any pointers :)

Best answer by todd_davis

example.zip

Instead of using the aggegator, how about pass it to the statisticscalculator. You need to make sure your date is in an appropriate Date format (YYYYMMDD). In stats calc, set you grouping to what you had in the aggregator. Analyze the date field. You can then get min, max and count of the dates. Then you can use datedifferencecalculator to get the difference....Example attached

Otherwise you cold create lists in the aggregator and listsorter them. Use the list indexer to create attribute in for high and low date, and then datedifferencecalulator to get the difference.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • Best Answer
  • July 22, 2016

example.zip

Instead of using the aggegator, how about pass it to the statisticscalculator. You need to make sure your date is in an appropriate Date format (YYYYMMDD). In stats calc, set you grouping to what you had in the aggregator. Analyze the date field. You can then get min, max and count of the dates. Then you can use datedifferencecalculator to get the difference....Example attached

Otherwise you cold create lists in the aggregator and listsorter them. Use the list indexer to create attribute in for high and low date, and then datedifferencecalulator to get the difference.


Forum|alt.badge.img
  • Author
  • July 22, 2016

example.zip

Instead of using the aggegator, how about pass it to the statisticscalculator. You need to make sure your date is in an appropriate Date format (YYYYMMDD). In stats calc, set you grouping to what you had in the aggregator. Analyze the date field. You can then get min, max and count of the dates. Then you can use datedifferencecalculator to get the difference....Example attached

Otherwise you cold create lists in the aggregator and listsorter them. Use the list indexer to create attribute in for high and low date, and then datedifferencecalulator to get the difference.

Thanks Todd, I will try the statisticscalculator, it sounds like that will do it. I formatted the dates and tried the list route with aggregator, created concatenated list for the dates and then split and used the ListRangeExtractor to get min and max. Complicated way to do it but worked! I will try statscalc to see if that will simplify it a bit. Thanks for your help.