cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marcodea
Helper II
Helper II

Recursive Function cause strange data load

Hi members.

My data source is a CSV with 4000 rows and one column is the DATE. For some rows the DATE is null because is related to the previous row. I would like to create a new field to have the correct DATE.

I used a recursive function that seems to work properly in the query editor, but when I apply the changes to the model, it starts loading data without stopping.

I created the following steps:

 

1) Load table TAB1

2) Add an index to TAB1

3) Duplicate TAB1 in TAB2

4) Create a custom recursive function that check the value of the current row, if null search the previous row. The function use TAB2

5) Invoke the custom function in a new column (TAB1 - FUN1)

 

Thanks for helping.

 

-------------------------  

 

Table in query editor. Calculated column Fun1 seems correct

Table.jpg

 

Recursive function 

Fun.jpg

 

 

Steps.jpg

1 ACCEPTED SOLUTION
artemus
Microsoft
Microsoft

It sounds like Table.FillUp(table, "column") library function will do what you want.

View solution in original post

2 REPLIES 2
marcodea
Helper II
Helper II

Very good suggest.

It seems Table.FillUp work only with null value and sometimes I need to check other column but with some other steps I find a solution

 

 

artemus
Microsoft
Microsoft

It sounds like Table.FillUp(table, "column") library function will do what you want.

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Kudoed Authors