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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Muki
Helper I
Helper I

filter table based on duplicate values in selected columns

Hi

 

I'm trying to find a solution for below situation.

 

Add a column with amount of duplicate values based upon selected columns ( version, coverage )

For these duplicate records, only keep the records with latest 'starte date' and status 'ok'.

 

 

Untitled.png

 

Would really appreciate if you could help me out!

 

Regards

Muki

 

 

 

 

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Hi @Muki

 

Try this calculated table

 

Go to Modelling Tab>>>NEW TABLE

 

Table =
ADDCOLUMNS (
    SUMMARIZE (
        TableName,
        TableName[version],
        TableName[coverage],
        "Start_Date", CALCULATE ( MAX ( TableName[start date] ), TableName[status] = "ok" )
    ),
    "ID", CALCULATE (
        SELECTEDVALUE ( TableName[id] ),
        TableName[start date] = EARLIER ( [Start_Date] )
    ),
    "Status", "Ok",
    "Count", CALCULATE ( COUNT ( TableName[coverage] ) )
)

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @Muki

 

Try this calculated table

 

Go to Modelling Tab>>>NEW TABLE

 

Table =
ADDCOLUMNS (
    SUMMARIZE (
        TableName,
        TableName[version],
        TableName[coverage],
        "Start_Date", CALCULATE ( MAX ( TableName[start date] ), TableName[status] = "ok" )
    ),
    "ID", CALCULATE (
        SELECTEDVALUE ( TableName[id] ),
        TableName[start date] = EARLIER ( [Start_Date] )
    ),
    "Status", "Ok",
    "Count", CALCULATE ( COUNT ( TableName[coverage] ) )
)

Thank you very much Muhammed @Zubair_Muhammad!

Hi @Zubair_Muhammad

I have an additional question about the resolution you provided here.

 

So in the summary part you filter the table based on version/coverage and the latest start date.

But then as part of 'add columns' you again mention the latest start date? I would like to know whether we can just add columns in our result table (because in my real example I have a lot more columns) without mentioning any expressions.

Basically, filter the table on some columns, create extra calculated columns and take over the values of other columns in my original table.

 

Is that possible?

thanks!

Muki 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

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.