Solved

IF function in transaction list

  • 2 August 2023
  • 2 replies
  • 367 views

  • Newly Minted Pigmenteer
  • 1 reply

Hi!
I am trying to populate a column in a transaction list by using a IF-formula. I want it to say that IF the Fulfillment center name = Start Depot name, then it should be classified as a Fulfillment Center (FC), and if it is not true, it should be classified as a Dip, but I get an error saying “Expressions are incompatible and cannot all be converted to Dimension ('[00] Hub'::'Fulfillment center')”

Please see below the formula I am trying and screenshot of my expected result:

IF('Act last Mile'.FULFILLMENT_CENTER='Act last Mile'.START_DEPOT_NAME,"Fulfillment Center","DIP")
 

 

icon

Best answer by Matt D 2 August 2023, 13:57

View original

2 replies

Userlevel 3
Badge +4

Hi Isabel,

Am I right in thinking the dimension lists used as data-types for the two properties you are referencing are different to one another? The error message you are seeing would suggest that is the case. Pigment can’t compare dimension list items from different lists, even if the individual items in those lists are named identically.

Something you could try, however, is to compare the ‘Name’ properties of the list items. To do this, you would write a formula like the one below:

IF('Act last Mile'.FULFILLMENT_CENTER.’Name’='Act last Mile'.START_DEPOT_NAME.’Name’,"Fulfillment Center","DIP")

See how I have added the reference to the ‘Name’ property after the reference to each transaction list property. This will work assuming that the property that stores the name of each list item in both dimension lists is ‘Name’, but this may not be the case! Perhaps check in each dimension list beforehand.

 

Let me know how you get on :)

Perfect, this made it work :D
Thank you!

Reply