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
Anonymous
Not applicable

Filling Up Based on Other Column Value

Could someone advise please how to perform the following transformation, I want to fill up Column: Resigned till the value of Column: Name changes, meaning, I want to fill up for all the cells related to: Second Person, and stop when the value of Column: Name becomes: First Person, how could I do that?

1 ACCEPTED SOLUTION

You have dash in 2nd argument of Table.FillUp. It should be removed...

You were not encouraged to do that with my code. 🙂

View solution in original post

13 REPLIES 13
edhans
Super User
Super User

You are going to have to give us information.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

I've tried to upload a photo for the data but it didn't allow me

 

But here you go, please find the table

 

Magdoulin_0-1629635393730.png

 

Group by Name column >

FillUp Resigned column in nested table >

Expand

 

Anonymous
Not applicable

By applying this, the fill up will go for instance for HR ID 2499, which is valid) but for 2498 and 2497 as well which is invalid.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUVKK1cHGMEJmRKYWg9nGMEFMhglWBlhjLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Resigned = _t]),
    Nulls = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Resigned"}),
    Grouped = Table.Group(Nulls, {"Name"}, {{"Gr", each Table.FillUp(_,{"Resigned"}), type table [Name=nullable text, Resigned=nullable text]}}),
    Expanded = Table.ExpandTableColumn(Grouped, "Gr", {"Resigned"}, {"Resigned"})
in
    Expanded
Anonymous
Not applicable

Ok, wait, I think I managed to manipulate the script to match my columns headings, but I'm afraid I'm still getting an error

 

Magdoulin_0-1629642334585.png

You have to add hashtag in front of column names with spaces.

#"HR ID" 

#"Resigned / Promoted"

 

Anonymous
Not applicable

Nope, it doesn't work,  even for simplicy I made the headings of one single word to avoid the confusion of adding / not adding #, but it seems that the issue with something else

 

Magdoulin_0-1629651715981.png

You have dash in 2nd argument of Table.FillUp. It should be removed...

You were not encouraged to do that with my code. 🙂

Anonymous
Not applicable

You are so good, it works perfectly, thanks a million.

Anonymous
Not applicable

You are so good, it works perfectly, thanks a million.

Anonymous
Not applicable

I'm so sorry, it seems that I cannot comprehend the script really, could you show me a screenshot of Group By step? Something like that

 

Power Query.png

Anonymous
Not applicable

Capture.PNG

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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