Power BI · मराठी आवृत्ती
7.6 Spaces, hidden characters आणि text case
खाली · म्हणजे extra space आणि ↵ म्हणजे लपलेला line break. Names आणि cities एकसारखे करायचे आहेत.
| City | Area | Customer |
|---|---|---|
| ·Pune | kothrud | ruhi bagale |
| PUNE·· | KOTHRUD | RUHI BAGALE |
| pune | Kothrud↵ | Ruhi Bagale |
| Pune | baner | shahrukh |
| City | Area | Customer |
|---|---|---|
| Pune | Kothrud | Ruhi Bagale |
| Pune | Kothrud | Ruhi Bagale |
| Pune | Kothrud | Ruhi Bagale |
| Pune | Baner | Shahrukh |
| Command | अर्थ | उदाहरण |
|---|---|---|
| Trim | फक्त सुरुवातीचे / शेवटचे spaces काढतो | ·Pune·· → Pune |
| Clean | Control characters काढतो | Kothrud↵ → Kothrud |
| lowercase | सर्व small letters | PUNE → pune |
| UPPERCASE | सर्व capital letters | blk-001 → BLK-001 |
| Capitalize Each Word | प्रत्येक शब्दाचं पहिलं letter capital | ruhi bagale → Ruhi Bagale |
| Add Prefix / Suffix | ठरलेला text जोडतो | 10001 → BLK-10001 |
- Ctrl वापरून City, Area, Customer निवडा.
- Transform › Format › Clean, मग Trim करा.
- Names साठी Capitalize Each Word, codes साठी UPPERCASE वापरा.
- मधले double spaces Replace Values ने एक space करा किंवा code वापरा.
- Web copy मध्ये non-breaking space असेल तर विशेष character
#(00A0)normal space ने replace करून पुन्हा trim करा.
Cleaned = Table.TransformColumns(Source, {
{"City", each Text.Proper(Text.Trim(Text.Clean(_))), type text},
{"Store ID", each Text.Upper(Text.Trim(_)), type text},
// collapse multiple inner spaces into one
{"Customer", each Text.Combine(List.Select(Text.Split(Text.Trim(_), " "), each _ <> ""), " "), type text}
})
Power Query text case-sensitive आहे; VertiPaq model साधारण case-insensitive comparison करतो. म्हणून योग्य display spelling query मध्येच ठरवा. Trim मधले spaces काढत नाही: Hotgi··Road साठी वेगळं cleaning हवं.
Practice
zoya, ZOYA आणि spaces असलेलं Zoya clean करा. Names proper case आणि e-mails lowercase ठेवा.