Skip to main content
Question

StatisticsCalculator not working for min/max for certain attribute


jon
Contributor
Forum|alt.badge.img+5
  • Contributor

I’m on 2022.2 and using a StatisticsCalculator with a Group By (based on the name of a CSV) to get statistics (min, max, mean) on a handful of attributes.  It works great for all but 1 attribute (Specific_Gravity) and I can’t figure out why.  The attribute type (64 bit real) is the same between Specific_Gravity and Temperature_F so I’m not sure why one works and the other doesn’t.  The kicker is that I can get Mean values for Specific_Gravity but not Min or Max.

Do I have the transformer configured incorrectly, is it a data type issue, or something else??

Screenshot of transformer with results:

 

3 replies

liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • March 8, 2024

I am not sure that your temperature min and max are reporting correctly either, looking at your screenshot row 19 has a temp value of 71.6 but the max is listed as 71 and an integer.

I tried to replicate your situation by making a csv with the values you had in the screenshot, running them through a statisticscalculator, and it output min/max just fine (also reported the temp max as 71.6 and a real number).
Have you tried running a new statisticscalculator with just the gravity calculations? Does it behave the same way?


DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • March 8, 2024

Hi @jon Do you get this problem with other datasets too? Do you get min & max values for Specific_Gravity without the GroupBy? If you can send us some sample data, please submit a case at https://support.safe.com/s/submit-case


jon
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • March 11, 2024

Removing the Group By resolves the issue of getting Min/Max values for Specific_Gravity but doesn’t produce the results I need since it’s treating all rows together - not grouping them by the CSV name.  Adding an Aggregator before the StatisticsCalculator isn’t really a good option either… think I’ll be submitting a case.


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