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
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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.