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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Inheriting and populate data based on a column

Hello!

 

Im having difficulties with inheriting "Startdate" based on "Orderid".

Powerbi Analysis question.png

 

For my issue - 

Let's take a random ORDERID as in the screenshot (GPA.3315).

The first purchase of the user has its start date and month and called "Purchase" (Yellow square in the screenshot).

The next purchase for the same ORDERID will be "Renewal" as in the screenshot (Red square in the screenshot).

I'm trying to inherit the startdate and startmonth from "Purchase" to all related "Renewal".

This way I can map the different renewals to the original start date of the user.

 

Any quick solution I can use?

 

Thanks in advance,

Bar

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use Fill feature.

https://docs.microsoft.com/en-us/power-query/fill-values-column 

Step1:

Sort sort the table by [Orderid]

Step2:

Selecte [Start date] and use fill down feature.

1.PNG

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use Fill feature.

https://docs.microsoft.com/en-us/power-query/fill-values-column 

Step1:

Sort sort the table by [Orderid]

Step2:

Selecte [Start date] and use fill down feature.

1.PNG

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Anyhelp?

@amitchandak 

amitchandak
Super User
Super User

@Anonymous , Not very clear.

 

Try a new column like

new column =
var _rnk = rankx(filter(Table, [user]=earlier([user]) && [startmonth]=earlier([startmonth])),[start date])
return
if(_rnk =1, "Purchase", "Renewal")

 

if needed remove startmonth filter

Anonymous
Not applicable

Thanks for the fast replay!

Sorry for not being clean. Im trying to copy the startdate and startmonth from "Purchase" row to the renewals of the same "OrderID".

this is what I'm trying to achieve 

DataShos18_3-1610025966680.png

 

 

I tried your solution in a custom column but I'm getting an error, what did I do wrong?

DataShos18_1-1610025505651.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors