# 7.16 Outliers आणि business ला न पटणाऱ्या values

Source: https://ravindrabagale.com/mr/powerbi/ch07-data-cleaning-a-z-in-power-query/7-16-outliers-and-invalid-values.html
Language: mr (Marathi with English technical terms)

Number type valid असला तरी value business च्या दृष्टीने चुकीची असू शकते.

 | Order ID
 | Qty
 | Delivery Time Mins
 | Status

 | BLK-70001
 | 2
 | 9
 | Delivered

 | BLK-70002
 | -1
 | 12
 | Delivered

 | BLK-70003
 | 1
 | 0
 | Delivered

 | BLK-70004
 | 3
 | 500
 | Delivered

 | BLK-70005
 | 1
 | null
 | Cancelled

 | Order ID
 | Data Quality

 | BLK-70001
 | OK

 | BLK-70002
 | Invalid quantity

 | BLK-70003
 | Invalid delivery time

 | BLK-70004
 | Delivery time too long

 | BLK-70005
 | OK (cancelled)

Practice साठी Rani च्या operations team ने नियम ठरवले: Quantity > 0; delivered order चा time 1–180 minutes. हे सार्वत्रिक नियम नाहीत.

Add Column › Conditional Column › Data Quality बनवा.

Quantity ≤ 0: Invalid quantity.

Status = Cancelled: OK (cancelled).

Delivery Time Mins null किंवा ≤ 0: Invalid delivery time.

Delivery Time Mins > 180: Delivery time too long.

बाकी OK. Null handling आवश्यक असल्यास Custom Column मध्ये code वापरा.

Flag = Table.AddColumn(Source, "Data Quality", each
    if [Quantity] <= 0 then "Invalid quantity"
    else if [Status] = "Cancelled" then "OK (cancelled)"
    else if [Delivery Time Mins] = null or [Delivery Time Mins] <= 0 then "Invalid delivery time"
    else if [Delivery Time Mins] > 180 then "Delivery time too long"
    else "OK", type text)

Column profile मधले min / max किंवा Number Filters वापरून unusual values शोधा. Rows ठेवून flag report मध्ये दाखवता येतो; योग्य measures मध्ये excluded rows स्पष्ट करा.

Practice

Amount = 0 आणि Status = Delivered साठी Zero amount flag जोडा. City नुसार flagged rows Group By ने मोजा.

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

90-minute delivery हा खरा incident असू शकतो. आपोआप delete करू नका. Flag करा, threshold business सोबत ठरवा आणि source totals मधला फरक समजावता येईल असा ठेवा.
