Skip to main content
Question

Min Value where another attribute has a value

  • February 21, 2024
  • 6 replies
  • 108 views

jamesovalle
Contributor
Forum|alt.badge.img+2

I hope this post makes sense. I used a list an attribute splitter -> list exploder -> attribute creator to assign a value based on conditional criteria. I now need to filter the data using the following logic: Take the minimum “_element_index” WHERE “Review Status” (newly created attribute) has a value, else use the MIN(element_index).

There would be a Group By: “Project Number”

Any help would be greatly appreciated   

6 replies

hkingsbury
Celebrity
Forum|alt.badge.img+68
  • Celebrity
  • February 21, 2024

In the attribute creator you can create a conditional value which will allow you to use logic like you’ve mentioned above
 


Here’s some documentation (old version but still applicable) on conditional values - https://safe-software.gitbooks.io/fme-desktop-advanced-training-2016/content/DesktopAdvanced5Attributes/5.04.ConditionalValues.html


jamesovalle
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 21, 2024

@hkingsbury I have already created the attribute, but I want to filter out the data since the list exploder made many ‘duplicates’. The logic I want to use to filter is when the “Review Status” has a value take the lowest “_element_index” that contains a “Review Status” ELSE take the lowest “_element_index”


jamesovalle
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 21, 2024

@hkingsbury I updated the question to make it a little more clear.. i think 😅


hkingsbury
Celebrity
Forum|alt.badge.img+68
  • Celebrity
  • February 21, 2024

Are you able to provide some examples using a sample of the data that you have? An example of the ‘input’ data and an output of what you’re wanting to achieve


jamesovalle
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 21, 2024

@hkingsbury Here is a super simple version. I want to take the lowest “_element_index” that has a “Review Status”, if “Review Status” is empty just give me the lowest “_element_index”

INPUT
OUTPUT

 


hkingsbury
Celebrity
Forum|alt.badge.img+68
  • Celebrity
  • February 21, 2024

Taking the data step back (into when its a list) you can just use a ListSearcher to achieve what you’re after.
 

I’ve also attached the above workbench (2023.1)