# 7.5 Blanks, nulls, Fill Down आणि Fill Up

Source: https://ravindrabagale.com/mr/powerbi/ch07-data-cleaning-a-z-in-power-query/7-5-blanks-and-nulls-remove-replace-fill-down-fill.html
Language: mr (Marathi with English technical terms)

Power Query मधला null आणि रिकामा text "" वेगळे आहेत. रिकाम्या value चा अर्थ समजून मग बदल करा.

 | Category
 | Product
 | Discount
 | Partner ID

 | Dairy & Breakfast
 | Gokul Cow Milk 500 ml
 | null
 | DP-01

 | null
 | Amul Butter 100 g
 | 5
 | null

 | null
 | Poha 1 kg
 | null
 | DP-03

 | Fruits & Vegetables
 | Nashik Grapes 500 g
 | 10
 | DP-02

 | null
 | Nagpur Oranges 1 kg
 | null
 | null

 | Category
 | Product
 | Discount
 | Partner ID

 | Dairy & Breakfast
 | Gokul Cow Milk 500 ml
 | 0
 | DP-01

 | Dairy & Breakfast
 | Amul Butter 100 g
 | 5
 | Unknown

 | Dairy & Breakfast
 | Poha 1 kg
 | 0
 | DP-03

 | Fruits & Vegetables
 | Nashik Grapes 500 g
 | 10
 | DP-02

 | Fruits & Vegetables
 | Nagpur Oranges 1 kg
 | 0
 | Unknown

 | परिस्थिती | योग्य कृती

 | Grouped export मध्ये category पहिल्या row वरच | Transform › Fill › Down

 | Group ची value खाली दिलेली | Transform › Fill › Up

 | Blank discount चा अर्थ खरंच discount नाही | null → 0

 | Cancelled order ला partner नाही | गरजेनुसार Unknown label

 | Order ID नसलेली junk row | योग्य filter किंवा Remove Blank Rows

Category निवडून Transform › Fill › Down करा.

Discount › Replace Values मध्ये null च्या जागी 0 द्या, जर हाच business अर्थ असेल.

Partner ID मध्ये null → Unknown करा.

सगळे columns रिकामे असलेल्या rows साठी Remove Blank Rows. एका column साठी त्याच्या filter मधला (null) काढा.

Filled   = Table.FillDown(Source, {"Category"}),
Zeroed   = Table.ReplaceValue(Filled, null, 0, Replacer.ReplaceValue, {"Discount"}),
Unknown  = Table.ReplaceValue(Zeroed, null, "Unknown", Replacer.ReplaceValue, {"Partner ID"}),
NoEmptyRows = Table.SelectRows(Unknown, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))

Practice

CIDCO product list मध्ये group च्या पहिल्या row वरच Sub Category असेल तर fill down करा. Blank MRP null ठेवा; योग्य असल्यास blank Brand ला Unbranded द्या.

रवींद्र बागले यांची tip

Cancelled order चा missing delivery time 0 केला तर average चुकीचा कमी दिसतो. Not applicable म्हणजे null; खरा शून्य असेल तेव्हाच 0. Fill Down genuine missing values वर करू नका.
