Skip to main content
Solved

Using Expression Evaluator for calculating percentages within an Attribute

  • November 22, 2020
  • 4 replies
  • 433 views

Hi, this is a really basic question, but none of the other answers I've read have quite fit. What I want to do is simple - find the percentages of these two values:Screenshot 2020-11-22 130120Screenshot 2020-11-22 130242The answer would be NoBlank - 78.22% , BothBlank - 21.78%

I'm aware the trick is to find a way to sum the Individual ID.total_count column in the Expression Evaluator, but "@sum@value(individual ID.total_count)' doesn't work, only returning the original values.

 

This so frustrating because I'm sure it's very simple.

Best answer by hkingsbury

Theres a few ways you could do it... here is one (FME 2020.1)

 

View original
Did this help you find an answer to your question?

4 replies

Forum|alt.badge.img+2

You could put a counter starting at 1 before the StatisticCalculator, add _count value to your statistics calculations for max, and then math it with the expression evaluator. It will append the 202 (or whatever the count is) to every record.


hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • Best Answer
  • November 22, 2020

Theres a few ways you could do it... here is one (FME 2020.1)

 


  • Author
  • November 22, 2020
hkingsbury wrote:

Theres a few ways you could do it... here is one (FME 2020.1)

 

This worked a charm, thanks!


  • Author
  • November 22, 2020
jlbaker2779 wrote:

You could put a counter starting at 1 before the StatisticCalculator, add _count value to your statistics calculations for max, and then math it with the expression evaluator. It will append the 202 (or whatever the count is) to every record.

I found this almost worked, but the final number for the BothBlank row was 198 (I assume because 198th row was the final BothBlank row). No worries though, the answer below worked fine for me. Thanks a lot for taking the time to help anyways!


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