Skip to main content
Question

Excel formula

  • February 26, 2025
  • 5 replies
  • 90 views

fme_can_do_it
Enthusiast
Forum|alt.badge.img+9

Hello all!

 

I am stuck and unable to create a formula in FME. It involves an Excel formula that I can't seem to replicate in FME. I know there's likely a simple way to achieve this. I need to subtract values. Here is a screenshot for reference: I would greatly appreciate any help!

 

 

5 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • February 26, 2025

Have a look at the Excel Writer Cell/Attribute Formula Attribution
https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/xlsx/XLSX_writer.htm

 

For the Feature corresponding to Row 6, that has an existing Attribute “Budget”, then you can use AttributeCreator to create a separate Attribute called “Budget.formula” and assign this new attribute a value of “=B3-B4” , or use string parsing (shown below in example as using a separate Attribute to track the Feature “_rowID”) to write this dynamically if the Difference value row number will be different for different Write scenarios.

 


fme_can_do_it
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • February 26, 2025

Hi ​@bwn I tried using the formula =B3-B4 in the attribute I created Budget.formula and its just did not work, can you give me any example?


fme_can_do_it
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • February 26, 2025

I used this expression as well,and it did not work:

@Evaluate(@Value(PaintingWalls)-@Value(Sewing))

 

=SUMIF(A:A, "Painting Walls",B:B)-SUMIF(A:A, "Sewing",B:B) 

Is it possible to replicate this formula from excel to FME?


fme_can_do_it
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • February 27, 2025

I was able to perform the calculations by creating a list that saved the budget information, and I used an expression evaluator to subtract the value in list 0 from the value in list 1. This allowed me to determine the difference in my Excel report. I am still curious to know if the Excel formula I mentioned earlier would work. However, I tried using that formula and was unable to make it function correctly.


nielsgerrits
VIP
Forum|alt.badge.img+52

This works:

 


Reply


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