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

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

Reply
IvanS
Helper V
Helper V

Replicate value for group of rows

Dear all,

 

I would need your help with coping values within one column for group of rows. In my case, I have invoice represented by Document_No. Our accounting system is spliting invoice into several entries (revenue, VAT and payment).

 

What I want to achieve - if payment date/closing date of at least one entry within the gropu is not blank, then to replicate this date to remaining rows within the group. Group is defined by entries having identical Document_No.

 

Please find below example:

IvanS_0-1683745488914.png

 

Thank you
Ivans

 

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@IvanS ,

You can create a new Calculated Column:

RevisedDate = CALCULATE( MAX( [Payment date/Closing date] ),
                       ALLEXCEPT( Invoices, Invoices[DocNo] ))

rsbin_0-1683749236802.png

Hope this helps.

Regards,

View solution in original post

2 REPLIES 2
IvanS
Helper V
Helper V

Hi @rsbin ,

 

it is working just perfectly when I create calculated column in Invoice table using RELATED(Payments[OriginalDate]).


However, when I try to add RELATED to your function I got following error: 
The MAX function only accepts a column reference as an argument.

 

Is there any way how to avoid this error and achieve the same result without creating additional columns in my Invoice table?

 

Thank you!

Ivans

rsbin
Super User
Super User

@IvanS ,

You can create a new Calculated Column:

RevisedDate = CALCULATE( MAX( [Payment date/Closing date] ),
                       ALLEXCEPT( Invoices, Invoices[DocNo] ))

rsbin_0-1683749236802.png

Hope this helps.

Regards,

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors