Forum Discussion
Getting distinct values for multiple columns
- 10 years ago
- 10 years ago
Hi Abhaykumar,
Use DAX and in DAX the function SUMMARIZE().
Summarize will pull out distinct values from columns.
So your resultset will be new table from Summarize
Table_Output = Summarize(Table_IN,Col1,Col2,Col3)
I hope it helps !
BR,
Achin
This formula will create a list of distinct values in the query editor (where "Source" is the name of the table/previous step and column names in square brackets):
List.Distinct(List.Union({Source[Col1], Source[Col2], Source[Col3]})) Not sure if you want this as a standalone query or merge the resulting list with some other table?
Hi ,
I'm trying this M code and getting an error "Expression.SyntaxError: Invalid identiffier"
Here is the code I'm entering to try and combine sales order number lists from two separate queries:
= list.distinct(list.union({"ZSD026 - Sales Analysis Report"[#"Sales Order No"],"ZSD029 - Invoice Report Material Level"[#"Sales Order No"}))