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

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

7.10 Columns आणि rows मध्ये Split

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

या page मध्ये

Transform › Split Column किंवा Home मधून text चे भाग करता येतात. Delimiter, character count, positions किंवा अक्षर / digit बदलण्याची जागा वापरता येते.

Method Before After Setting used
By Delimiter BLK-PUN-KOT-01 BLK · PUN · KOT · 01 Delimiter "-", Each occurrence
By Number of Characters BLK250314 BLK · 250314 3 characters, Once, as far left as possible
By Positions 20250314KOT 20250314 · KOT Positions 0, 8
By Lowercase to Uppercase KothrudHub Kothrud · Hub –
By Uppercase to Lowercase PUNkothrud PUNk · othrud (usually not what you want) –
By Digit to Non-Digit 500ml 500 · ml –
By Non-Digit to Digit Poha1kg Poha · 1kg –

वरील table मधले inputs व outputs sample strings आहेत. By Uppercase to Lowercase चा PUNkothrud result अपेक्षेप्रमाणे नसेल; अशा वेळी delimiter किंवा योग्य extraction निवडा.

  1. Store ID निवडा; उदा. BLK-PUN-KOT-01.
  2. Transform › Split Column › By Delimiter.
  3. Custom delimiter - आणि Each occurrence निवडा.
  4. Columns ना Platform Code, City Code, Area Code, Store No नावं द्या. Store No Text ठेवा म्हणजे 01 मधला zero टिकेल.
  5. मूळ column हवा असेल तर आधी Duplicate Column करा किंवा Add Column › Extract वापरा.

एकाच cell मधले items वेगळ्या rows मध्ये

Order ID Items
BLK-40001 Ladi Pav; Amul Butter; Poha
BLK-40002 Nashik Grapes
Order ID Items
BLK-40001 Ladi Pav
BLK-40001 Amul Butter
BLK-40001 Poha
BLK-40002 Nashik Grapes

Items › Split Column › By Delimiter मध्ये ; द्या. Advanced options › Split into Rows निवडा. शेवटी Format › Trim करा.

Split = Table.SplitColumn(Source, "Store ID",
    Splitter.SplitTextByDelimiter("-", QuoteStyle.Csv),
    {"Platform Code", "City Code", "Area Code", "Store No"})
ToLists  = Table.TransformColumns(Source, {{"Items", Splitter.SplitTextByDelimiter(";")}}),
ToRows   = Table.ExpandListColumn(ToLists, "Items"),
Trimmed  = Table.TransformColumns(ToRows, {{"Items", Text.Trim, type text}})

Practice

Pack Size मधले 500ml, 1kg, 12pcs हे By Digit to Non-Digit वापरून Size Value आणि Size Unit करा. Size Value Decimal Number करा.