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
Spotto
Helper IV
Helper IV

Fill in duplicate line Power BI

hi, 

1.png

 

I have a table that has duplicate records (CAK) I would like to group by (CAK) and the STATUS field bring the "P", is there any way?

 

2.png
thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Spotto ,

 

Can you enter the power query editor? It's easier to complete in power query.

1.Right-click the CAK column and select Group by.

vstephenmsft_0-1637130690078.png

 

2.Operation select All Rows.

vstephenmsft_1-1637130731879.png

 

3.Add a custom column.

= Table.FillDown([Count],{"STATUS"})

vstephenmsft_3-1637131060857.png

 

4.Remove the Count column, and expand the custom column.

vstephenmsft_4-1637131123931.pngvstephenmsft_5-1637131133106.png

vstephenmsft_6-1637131138242.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Spotto ,

 

Can you enter the power query editor? It's easier to complete in power query.

1.Right-click the CAK column and select Group by.

vstephenmsft_0-1637130690078.png

 

2.Operation select All Rows.

vstephenmsft_1-1637130731879.png

 

3.Add a custom column.

= Table.FillDown([Count],{"STATUS"})

vstephenmsft_3-1637131060857.png

 

4.Remove the Count column, and expand the custom column.

vstephenmsft_4-1637131123931.pngvstephenmsft_5-1637131133106.png

vstephenmsft_6-1637131138242.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

VahidDM
Super User
Super User

Hi @Spotto 

 

Try this code to create a new Column with DAX:

New Column =
IF (
    ISBLANK ( [CAK] ),
    CALCULATE (
        MAX ( [STATUS] ),
        FILTER ( ALL ( table ), [CAK] = EARLIER ( [CAK] ) )
    ),
    [STATUS]
)



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

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.