Skip to main content
Question

need help using right transformer to filter

  • June 24, 2016
  • 10 replies
  • 24 views

Forum|alt.badge.img

I have some data that need to be filter first and then calculate Values count of WO, Average of Age, and % of age.

1. I need to filter out work order that are CM, PM, CAP and MM. I have done that using Test Filter,

2. I need to then filter our CM's with HOLD status. I have column that is HOLD and has different status. I need to calculate CM's that are not on hold and CM's that are on hold.

3. Then I need to Count the work order, Average of age and % of AGE for all work types.

I am not sure what transformers i need to use the filter. I need your help.

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.

10 replies

david_r
Celebrity
  • June 24, 2016

Have you looked at the StatisticsCalculator?


Forum|alt.badge.img
  • Author
  • June 24, 2016

yes, I have looked at the statistics calculator and it will do the calculation part, I am stuck on second part of the filter. i can filter out CM,PM,CAP and MM categories but i don't know how to filter out HOLD status work order after or before the first filter.


Forum|alt.badge.img
  • Author
  • June 24, 2016

i need to filter like this in FME


Forum|alt.badge.img+5

yes, I have looked at the statistics calculator and it will do the calculation part, I am stuck on second part of the filter. i can filter out CM,PM,CAP and MM categories but i don't know how to filter out HOLD status work order after or before the first filter.

Can you not add a second TestFilter to filter those features?


Forum|alt.badge.img
  • Author
  • June 24, 2016

yes, I have looked at the statistics calculator and it will do the calculation part, I am stuck on second part of the filter. i can filter out CM,PM,CAP and MM categories but i don't know how to filter out HOLD status work order after or before the first filter.

@mark2catsafe i have tried adding 2nd test filter but it's not working to what i want


takashi
Celebrity
  • June 25, 2016

i need to filter like this in FME

Hi @ruby6, as @mark2catsafe suggested, the TestFilter can be used if you filters the features according to possible values (status) for the HOLD attribute. However you mentioned that it didn't work, so we need to understand exactly your desired filtering rules. Can you clarify how you want to filter the features in more detail? It's ideal if you would describe using some concrete examples.


Forum|alt.badge.img
  • Author
  • June 28, 2016

Hi @ruby6, as @mark2catsafe suggested, the TestFilter can be used if you filters the features according to possible values (status) for the HOLD attribute. However you mentioned that it didn't work, so we need to understand exactly your desired filtering rules. Can you clarify how you want to filter the features in more detail? It's ideal if you would describe using some concrete examples.

fme-test-filter.pdf

takashi
Celebrity
  • June 29, 2016

i need to filter like this in FME

@ruby6, schema of the source table is still unclear, but maybe a StatisticsCalculater can do that, as David suggested at first. You can categorize the records with the 'Group By' parameter in the transformer.


Forum|alt.badge.img
  • Author
  • June 29, 2016

@ruby6, schema of the source table is still unclear, but maybe a StatisticsCalculater can do that, as David suggested at first. You can categorize the records with the 'Group By' parameter in the transformer.

@takashi I was able to use Statistics calculator and it did do what i need to do but only think i can't figure out how to calculate the % of Total.

For example

375 42%

76 8%

144 16%

3 0%

274 30%

28 3%

Total 900 100%

Is there a way to calculate the % of the total in FME.

Thank you


takashi
Celebrity
  • June 30, 2016

@takashi I was able to use Statistics calculator and it did do what i need to do but only think i can't figure out how to calculate the % of Total.

For example

375 42%

76 8%

144 16%

3 0%

274 30%

28 3%

Total 900 100%

Is there a way to calculate the % of the total in FME.

Thank you

The StatisticsCalculator itself doesn't have the function to calculate percentage, but you can add another StatisticsCalculator to calculate the sum (grand total) for the summarized features, and then calculate the % (value / sum * 100) for each feature output from the Complete port. To calculate the %, consider using the ExpressionEvaluator or AttributeCreator.