Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
How to Create a New Table from existing table using EDIT QUERY in POWER BI? IN POWER QUERY NOT IN DATA MODEL
Example :
Table A | |||
Name | ID | Amount | Product |
surya | 111 | 324 | Milk |
surya | 111 | 32423 | chocolate |
dinesh | 222 | 52432 | cherry |
dinesh | 222 | 234324 | orange |
Prem | 333 | 523423 | apple |
Vishnu | 444 | 42342 | Juice |
Result (Expected Table) : I want to fetch column 'ID and Name' from table A using DISTINCT Fuction.
Table B | |
Name | ID |
surya | 111 |
dinesh | 222 |
Prem | 333 |
Vishnu | 444 |
It would be great if you help me.
Thanks in Advance!
Solved! Go to Solution.
Hi @Anonymous ,
I also use the option "Group By" to do it. You could have a try.
let
Source = Table,
#"Grouped Rows" = Table.Group(Source, {"Name", "ID"}, {{"Count", each Table.RowCount(Table.Distinct(_)), Int64.Type}}),
#"Removed Columns" = Table.RemoveColumns(#"Grouped Rows",{"Count"})
in
#"Removed Columns"
Hi @Anonymous ,
I also use the option "Group By" to do it. You could have a try.
let
Source = Table,
#"Grouped Rows" = Table.Group(Source, {"Name", "ID"}, {{"Count", each Table.RowCount(Table.Distinct(_)), Int64.Type}}),
#"Removed Columns" = Table.RemoveColumns(#"Grouped Rows",{"Count"})
in
#"Removed Columns"
@Anonymous
Multiple solutions here, all of them are great, you can also consider
Right click on your table in powerquery ==> Duplicate ==> on this new table click 'Group BY' in the tool bar.
Hi @Anonymous do the following to get a table like you want:
Now you can use this as a DIM table in your model. I do this all of the time, creating DIM tables from FACT tables. 👍
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reportingafter loaded your tabIN, create a new blank query under NewSource tools.
Then load the columns you want to operate on :
and finally remove duplicate (a tool under remove rows group):
and you get what you want:
@Anonymous - Right-click your first query and select Reference.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
10 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |