Dependant dropdown with ORDERBY expression

I am trying to figure out how to properly write the dependent dropdown expression using the “ORDERBY” expression to sort the resulting responses alphabetically.

Dependent drop down expression:
IN( [_THIS], SELECT(Inventory Items[Category], [_THISROW].[Factory] = [Category]))

Attempted to add orderby:
ORDERBY(IN( [_THIS],SELECT(Inventory Items[Category], [_THISROW].[Factory] = [Category]),[category]))

I get the error “ORDERBY has invalid inputs”

I’m pretty sure I wrote the expression wrong but I can’t seem to figure out the correct way. Any suggestions?

1 Like

Thank you @Steve I read the article but i seem to be miss understanding the structure of the expression.

The dependant dropdown expression should provide the list( Row key) of available responses filtered to provide only items that correspond with items in the “factory” column.

I also provided the column name for the sort(sort key) but i still get the error. I’m relatively new to this and I am not interpreting the instructions correctly. I also tried the sort expression but wound up with the same error.

IN() produces a singular Yes/No value, but ORDERBY() wants a list of Ref values. A Ref value is a value of the key column of a row of a table.

Is Category the key column of the Inventory Items table?

See also: