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

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

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.