Skip to main content
Question

Dynamic Statistics Calculator

  • April 26, 2023
  • 2 replies
  • 74 views

jdh
Contributor
Forum|alt.badge.img+36
  • Contributor
  • 2001 replies

Is there anyway to configure the StatisticsCalculator on a dynamic set of attributes?

I would like to generate a histogram of attribute values, where the attribute name is determined at runtime. Bonus if I can process multiple attributes at once.

2 replies

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • April 27, 2023

Could you set up a workspace to copy the selected attribute to a fixed name - like attr1 - and then hard code that into the StatisticsCalculator name field? But it looks like the StatsCalculator field name can be a user parameter, so would that work?


jdh
Contributor
Forum|alt.badge.img+36
  • Author
  • Contributor
  • 2001 replies
  • April 27, 2023

Could you set up a workspace to copy the selected attribute to a fixed name - like attr1 - and then hard code that into the StatisticsCalculator name field? But it looks like the StatsCalculator field name can be a user parameter, so would that work?

Hi Mark,

I had some success with wrapping the StatsCalc in a custom transformer with an attributeDereferencer.

 

However BAD Things happened when I tried to use it while looping through a list. Even with linked fmx, even with exposing the loop input...