Help with IF expression

This solution might be on the community but am not seeing it.

 

I have an Enum List column where users can select multiple products called [Machine type]. I have created another column called [Category].

 

Depending on what items are selected in the [Machine type], I want a specific value to be entered into the [Category].

 

The expression I thought would work for [Category]:

IFS(
IN(LIST("Contoura", "TDR"), [Machine type], "Groundcare"),
IN(LIST("Cyclone", "Disc Mower"), [Machine type], "Agricultural")
)

 

But I'm being told the IN function is used incorrectly.

 

What am I doing wrong here? Any advice would be most appreciated!

Solved Solved
0 16 488
1 ACCEPTED SOLUTION

Actually I was a little unfair, looking at the first post again, the [Machine Type] column is populated through an EnumList so as long as the list does not allow new entries, we can actually trust it. Therefore we need to compare the selected machine types with the 'lookup values'. I think the following should do it:

IFS(
  ISNOTBLANK(
    INTERSECT( [Machine Type] , LIST(Contoura, TDR, Swift, Groundcare Range) )
  ), "Groundcare",
  ISNOTBLANK(
    INTERSECT( [Machine Type] , LIST(Cyclone, Cyclone Mower) )
  ), "Agricultural",
  ISNOTBLANK(
    INTERSECT( [Machine Type] , LIST(Slurry, Agitator) )
  ), "Slurry Handling"
)

View solution in original post

16 REPLIES 16
Top Labels in this Space