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

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

9.6 Source.Name वरून month आणि transaction categories

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

Combined Bank Transactions query मध्ये Source.Name उदा. Jan.xlsx असतो.

  1. Source.Name › Add Column › Extract › Text Before Delimiter › dot; नाव Month.
  2. Month No साठी List.PositionOf({"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}, [Month]) + 1 वापरा. Unknown नावासाठी 0 येऊ शकतो; तो flag करा.
  3. वर्षही टिकवण्यासाठी 2025-01.xlsx अशी naming पद्धत अधिक स्पष्ट. Transaction month Date table मधून काढता येतो.
  4. Mode conditional column: Narration begins UPI / NEFT / IMPS / ATM; बाकी Other.
  5. Category keywords वर बनवा. अनेक rules असतील तर mapping table वापरा.
  6. Combined query मधला जुन्या column नावांचा Changed Type step दुरुस्त करा.
Month    = Table.AddColumn(Src, "Month", each Text.BeforeDelimiter([Source.Name], "."), type text),
Mode     = Table.AddColumn(Month, "Mode", each Text.BeforeDelimiter(Text.Upper([Narration]), "/"), type text),
Category = Table.AddColumn(Mode, "Category", each
              let n = Text.Upper([Narration]) in
              if Text.Contains(n, "BLINKIT") or Text.Contains(n, "AMAZON NOW") then "Quick Commerce"
              else if Text.Contains(n, "SALARY") then "Salary"
              else if Text.StartsWith(n, "ATM") then "Cash Withdrawal"
              else if Text.Contains(n, "RENT") then "Rent"
              else "Other", type text)
Total Spend    = SUM('Bank Transactions'[Debit])
Total Income   = SUM('Bank Transactions'[Credit])
Net Savings    = [Total Income] - [Total Spend]
Quick Commerce Spend = CALCULATE([Total Spend], 'Bank Transactions'[Category] = "Quick Commerce")

Code मधला Text.BeforeDelimiter Mode sample UPI/NEFT narrations साठी आहे. ATM WDL मध्ये slash नसतो; म्हणून वरच्या begins-with rules ने ATM वेगळं हाताळा. Null narrationsसाठी guard द्या.

Total Spend = Debit sum; Total Income = Credit sum; Net Savings हा दोन्हींचा फरक. Bank transfer / refund मुळे credit म्हणजे नेहमी income आणि debit म्हणजे नेहमी खर्च असेलच असं नाही; या practice metric ची व्याप्ती स्पष्ट ठेवा.