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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Remove Duplicates by keeping highest value in another column

Hello,

 

I want to remove duplicates of 'Part#/Site' (Merged column) from a table 'packaging dump sheet'; keeping the highest 'revision' number for each 'Part#/site'.

 

I recreated a measure form another post but it did not work- returns only 0s no 1s (See below)

uc360_0-1683120477198.png

Any help much appreciated.

 

Adam P

 

 

1 ACCEPTED SOLUTION
Wilson_
Memorable Member
Memorable Member

Hello Adam,

 

Try the DAX you screenshotted as a calculated column, not as a measure. If that doesn't work, try the below instead (as a calculated column):

 

Column = 
VAR PartSite = 'Packaging Dump Sheet'[Part#/Site]
VAR Revision = 'Packaging Dump Sheet'[ Revision ]
VAR FilteredTable =
FILTER (
    'Packaging Dump Sheet',
    'Packaging Dump Sheet'[Part#/Site] = PartSite
)
VAR MaxRevision =
MAXX (
    FilteredTable,
    'Packaging Dump Sheet'[ Revision ]
)
VAR Result = IF ( Revision = MaxRevision, 1, 0 )

RETURN Result

 

 

P.S.: For future reference, if you share your measure as a screenshot instead of text, you add friction to the process of helping you; somebody would have to re-type out your entire measure to re-create it instead of just copy pasting. Help us help you. 🙂


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi Wilson, 

 

Thnak you that has solved the issue.

 

I will make sure to copy/paste my syntax rather than provide a screenshot next time.

 

Kind regards, Adam P 🙂

 

Excellent, happy to help Adam. 😄




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Wilson_
Memorable Member
Memorable Member

Hello Adam,

 

Try the DAX you screenshotted as a calculated column, not as a measure. If that doesn't work, try the below instead (as a calculated column):

 

Column = 
VAR PartSite = 'Packaging Dump Sheet'[Part#/Site]
VAR Revision = 'Packaging Dump Sheet'[ Revision ]
VAR FilteredTable =
FILTER (
    'Packaging Dump Sheet',
    'Packaging Dump Sheet'[Part#/Site] = PartSite
)
VAR MaxRevision =
MAXX (
    FilteredTable,
    'Packaging Dump Sheet'[ Revision ]
)
VAR Result = IF ( Revision = MaxRevision, 1, 0 )

RETURN Result

 

 

P.S.: For future reference, if you share your measure as a screenshot instead of text, you add friction to the process of helping you; somebody would have to re-type out your entire measure to re-create it instead of just copy pasting. Help us help you. 🙂


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.