cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kumsha1
Helper V
Helper V

FillDown for each group

Hi,

 

I did a group by columns and FillDown on a conditional column, however the FillDown is not happening for each group...Can someone help with powerquery to FillDown for each group (SHIPMENT_NUMBER). TIA for your help !

 

kumsha1_0-1605683241613.png

 

#"Grouped Rows" = Table.Group(Source, {"TS_SHIPMENT_NUMBER", "TRANSHIPPERSHORTNAME", "TS_SHIP_NAME", "TS_STARTDATE_UTC"}, {{"LINES", each _, type table [TRANSHIPPERSHORTNAME=nullable text, FROM_DATE=nullable datetime, TS_END_DATE_UTC=datetime, COMMENT=nullable text, TS_SHIP_NAME=nullable text, TS_STARTDATE_UTC=datetime, TS_SHIPMENT_NUMBER=nullable text, TRANSHIPPERNAME=text, HATCH=nullable text, BARGE_NO=nullable number, PROGRESSIVE_TON_START=nullable number, PROGRESSIVE_TONNES=nullable number]}}),
#"Expanded LINES" = Table.ExpandTableColumn(#"Grouped Rows", "LINES", {"FROM_DATE", "TS_END_DATE_UTC", "COMMENT", "TRANSHIPPERNAME", "HATCH", "BARGE_NO", "PROGRESSIVE_TON_START", "PROGRESSIVE_TONNES"}, {"FROM_DATE", "TS_END_DATE_UTC", "COMMENT", "TRANSHIPPERNAME", "HATCH", "BARGE_NO", "PROGRESSIVE_TON_START", "PROGRESSIVE_TONNES"}),
#"Added Conditional Column" = Table.AddColumn(#"Expanded LINES", "LINES", each if [PROGRESSIVE_TONNES] = null then [PROGRESSIVE_TON_START] else [PROGRESSIVE_TONNES]),
#"Replaced Value" = Table.ReplaceValue(#"Added Conditional Column",0,null,Replacer.ReplaceValue,{"LINES"}),
#"Filled Down" = Table.FillDown(#"Replaced Value",{"LINES"}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each [TS_STARTDATE_UTC] = #datetime(2020, 10, 26, 0, 0, 0))
in
#"Filtered Rows"

5 REPLIES 5
Quentin
Helper III
Helper III

Hello over there,

Have you managed to make this? 
This is exactly the thing i want indeed 🙂 
Thank you in advance

v-yingjl
Community Support
Community Support

Hi @kumsha1 ,

Based on your description and data sample, not certain what is your expected output. Which column you want to fill down based on each group? Could you please consider sharing more details about this issue for further discussion?

 

Best Regards,
Community Support Team _ Yingjie Li

Jimmy801
Super User III
Super User III

Hello @kumsha1 

 

I can't see the data source but I suppose that the cell value is "null" and not null. Fill-Down works only with datatype null. So you can do a replacevalue to replace "null" with null.

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Hi @Jimmy801 ,

 

There is no issue with null. FillDown is happening for entire table and i want this to happen for each group of the data.

Hello @kumsha1 

 

sorry, I cannot follow you. Can you share some data, some screenshots and what exactly you are missing?

 

BR

 

Jimmy

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