Forum Discussion
Anonymous
3 years agoNot applicable
Create a table using Distinct values from another table
Let's say I have two tables ORDERS -------- Order_Num, Material_Code, etc., etc., Ord001, 1001 Ord002, 1002 Ord003, 1003 Ord004, 1003 Ord005, 1001 MATERIALS ------------- Material_C...
- 3 years ago
Hi Anonymous ,
Please try:
Table = FILTER('MATERIALS',[Material_Code] in VALUES(ORDERS[ Material_Code]))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FreemanZ
3 years agoSuper User
hi Anonymous
try like:
SlicerTable =
SUMMARIZE(
Orders,
Materials[Material_Code],
Materials[Material_Desc]
)
Anonymous
3 years agoNot applicable
Thanks but unfortunately not the solution. The way I understand the SUMMARIZE function is that it can only summarize on a field in its own dataset.
This works: slicerTable = SUMMARIZE(Orders,Orders[Materials_Code]) and returns the distinct list of codes (but no descriptions of course).
slicerTable =SUMMARIZE(Orders,Orders[Material_Code], Materials[Materials_Desc] )
fails with "The column 'Material_Desc' specified in the 'SUMMARIZE' function was not found in the input table." and any variation that puts a column from Materials in the query, fails with a similar message so your suggestion:
SlicerTable =
SUMMARIZE(
Orders,
Materials[Material_Code],
Materials[Material_Desc]
)
crashes with a similar message.
I think I may have to do multiple steps!
\ PauSe