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 solution to combine two columns of sales order numbers from two separate queries and get an error:
"Expression.SyntaxError: Invalid identifier"
here is my code:
= list.distinct(list.union({"ZSD026 - Sales Analysis Report"[#"Sales Order No"],"ZSD029 - Invoice Report Material Level"[#"Sales Order No"}))
- ImkeF7 years agoCommunity Champion
Hi Anonymous ,
the M-language is case sensitive.