Parse CODESSTRING in Power BI Using Power Query (M)

๐Ÿ“˜ Context The CODESSTRING field returned from Oracle contains serialised key-value pairs using non-printing ASCII characters: Example value: โœ… Goal Convert this encoded string into structured columns in Power BI, e.g.: ACCOUNT CODE_B CODE_C CODE_D CODE_E 10201 200 2011072 ๐Ÿ› ๏ธ Solution: Power Query Function Step 1: Create the Parsing Function Step 2: Apply the Function … Read more

Steps to implement FTE Logic in Power BI

โœ… What Youโ€™ll Need ๐Ÿ› ๏ธ Step-by-Step Power Query Approach Step 1: Load both tables into Power Query Step 2: Create a Cross Join (Employee ร— Month) Step 3: Add FTE Logic (Human Version in M) Now, for each row (i.e. employee ร— month), add a custom column to calculate the monthly FTE: ๐Ÿงพ Final Step: … Read more

Monthly FTE Logic

Each month, we assess whether and how much an employee is active in their role, based on their employment dates, status, and working pattern. The output is a monthly FTE value that represents their contribution in that month. Here’s how it’s determined: 1๏ธโƒฃ If the person is seconded or transferred out We calculate how much … Read more

Extended REST Semantics โ€” In Simple Terms

Verb Meaning (Simple) Behaviour SQL/Data Analogy Use Case GET “Tell me about this.” Retrieves a resource or field SELECT * FROM table WHERE id = x Viewing a project status or employee detail POST “Hereโ€™s a new thing.” Creates a new resource INSERT INTO table … New project added, first metadata entry PUT “Replace the … Read more

How to Find the SQL Definition of a View in Oracle

๐Ÿ” When working with Oracle databases, itโ€™s often helpful to retrieve the SQL definition of a view โ€” especially when reverse engineering or documenting logic for reporting and data pipelines. โœ… View Definitions via USER_VIEWS If you own the view or have access to it within your schema, you can use the following query: ๐Ÿ’ก … Read more

Stripping Tags from Rich Text Imports Using Python

When importing rich text data into a Data Warehouse (DWH), it’s often necessary to remove unwanted HTML tags while preserving essential formatting. This guide outlines a method using Python’s BeautifulSoup library to clean and structure the data efficiently. Why Strip HTML Tags? Rich text from sources like web applications, CMS platforms, and APIs often includes … Read more

Dynamic API Query Construction

The following Power Query (M) script demonstrates how to extract a list of dates from a table, convert them into a formatted string, and use them dynamically in an API request: Step-by-Step Guide Explanation: Application in get.myhistory This approach can be used within get.myhistory to dynamically retrieve historical records by supplying a list of relevant … Read more