This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi All,
I'd like to remove duplicates in my dataset based on a logical primary key (ID) and retain the latest modified records values.
Solved! Go to Solution.
You can achieve this using power query, click query editor and copy the original table. Then click "Transform"-> "Group By" as below:
Then merge the original table with duplicated tabel as below:
The result is as below, you can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can achieve this using power query, click query editor and copy the original table. Then click "Transform"-> "Group By" as below:
Then merge the original table with duplicated tabel as below:
The result is as below, you can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yuta-msft, @parhamasq, This method will not return the most recent value, but instead the largest, which would give incorrect results if value1 decreases. If 62 is replaced with 42 (for example) in the source table, the final table does not show the most recent update for bill, but instead the largest.
Source:
end result:
Hi @parhamasq
try to use a new calculated table like this
NewTable =
ADDCOLUMNS(
SUMMARIZE(
'Table';
'Table'[ID];'Table'[Title];"Last Modified new";MAX('Table'[Last Modified])
);
"Value";calculate(max('Table'[Value1]);filter('Table';'Table'[Last Modified]=[Last Modified new] && 'Table'[ID]=[ID])))do not hesitate to give a kudo to useful posts and mark solutions as solution
This is an error:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
hi @parhamasq
do you have rows which has a different ID and Title values in your data model?
do not hesitate to give a kudo to useful posts and mark solutions as solution
Thank you
I'm a new joiner in Power BI,
Would you please explain to me more about create the table in Power BI?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 35 | |
| 28 | |
| 22 | |
| 21 |