Integrate Orderby function with Select function

How do I go about integrating the ORDERBY function into the below SELECT function I have working as my Valid_if for the [Country] column in the LOCAL PRODUCT ASSORTMENT table.

  1. I want to order the result of the below select funtion list of keys in INVENTORY OWNER[Country], by the [Country] column in the COUNTRIES table.
  2. The COUNTRIES table key column is [Country No] and the label column is [Country] mentioned in point 1, and the [Country] column in the LOCAL PRODUCT ASSORTMENT table is referenced to the COUNTRIES table.

 

 

 

SELECT(
	INVENTORY OWNER[Country],
  ([Sales Unit] = [_THISROW].[Sales Unit])
)

 

 

 

 
Solved Solved
0 2 32
1 ACCEPTED SOLUTION

How about

ORDERBY(
 SELECT(
  INVENTORY OWNER[key col],
  [Sales Unit] = [_THISROW].[Sales Unit]
 ),
 [Country]
)

View solution in original post

2 REPLIES 2

How about

ORDERBY(
 SELECT(
  INVENTORY OWNER[key col],
  [Sales Unit] = [_THISROW].[Sales Unit]
 ),
 [Country]
)

ORDERBY(
  FILTER("Inventory Owner", [Sales Unit] = [_ThisRow].[Sales Unit]), [Country]
)

Top Labels in this Space