Ravindra Bagale · Power BIसर्व coursesया course चे lessonsशोधाEnglish

Power BI · मराठी आवृत्ती

7.6 Spaces, hidden characters आणि text case

रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation

खाली · म्हणजे 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
CleanControl characters काढतोKothrud↵ → Kothrud
lowercaseसर्व small lettersPUNE → pune
UPPERCASEसर्व capital lettersblk-001 → BLK-001
Capitalize Each Wordप्रत्येक शब्दाचं पहिलं letter capitalruhi bagale → Ruhi Bagale
Add Prefix / Suffixठरलेला text जोडतो10001 → BLK-10001
  1. Ctrl वापरून City, Area, Customer निवडा.
  2. Transform › Format › Clean, मग Trim करा.
  3. Names साठी Capitalize Each Word, codes साठी UPPERCASE वापरा.
  4. मधले double spaces Replace Values ने एक space करा किंवा code वापरा.
  5. 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 ठेवा.