Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Poornima2023
Frequent Visitor

Get True false when duplicate in a row is find in direct query

I have below data

NameIDAge

Key(concatenated name and id)

Duplicate
A612A6False
A64A6

True

B15B1False
C96C9False
C92C9True
D33D3False
6 REPLIES 6
Poornima2023
Frequent Visitor

Not able to open link

dufoq3_0-1710681688853.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

dufoq3
Super User
Super User

Hi @Poornima2023,

 

Result

dufoq3_0-1710681120353.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIDYkMjIOFophSrgxAzQQg5gZQAsSkQOxmChZyBTEuoSmdLFCEjhJALkGkMxS7GSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, ID = _t, Age = _t, Key = _t]),
    GroupedRows = Table.Group(Source, {"Key"}, {{"All", each Table.RemoveColumns(Table.AddColumn(Table.AddIndexColumn(_, "Index", 0, 1), "Duplicate", (x)=> if x[Index] = 0 then false else true, type logical), {"Index"}), type table}}),
    Combined = Table.Combine(GroupedRows[All])
in
    Combined

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

will it work in power bi?

Yes, of cource. If you don't know how to use my query --> Read note below my post.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Its not working as my data is directquery mode

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.