Power Query Problems

How to Parse Structured Text Logs with Power Query in Excel

Huda QurayshiHuda Qurayshi Nov 10, 2026 869 views

Question details

The user needs to extract specific data fields such as time, cell ID, carrier index, reference signal, receiver port, and SNR values from structured text or CSV log files.

How to Parse Structured Text Logs with Power Query
Product
Excel
Device & OS
not provided
Scenario
Importing and transforming structured telecom log files to extract and map specific network metrics for data analysis.
Observed behavior
The raw text logs need to be parsed correctly, separating individual records into fields and mapping receiver ports 0 through 3 to their corresponding SNR values despite indentation challenges.
Before you start

Ensure your source text or CSV log file is saved locally on your computer, and take note of the exact file path before importing it into your query.

Solution 1Recommended

Import and Transform Log Data Using Power Query

The most efficient way to parse structured text logs is by using the built-in data transformation tools in Power Query to split fields and map receiver ports.

Power Query provides robust text manipulation features that can easily handle complex log structures. By sequentially splitting columns and applying conditional logic, you can map the receiver ports to SNR values without needing external scripts.

1
Import the Data

Open Excel, navigate to the 'Data' tab, click on 'Get Data', and choose 'From Text/CSV' to locate and import your structured log file.

2
Split Records into Fields

In the Power Query Editor, select the main data column and use the 'Split Column' feature (found in the Home tab) to separate time, cell ID, and carrier index based on your file's specific delimiter or character length.

3
Identify Reference Signals

Go to 'Add Column' > 'Conditional Column' to create a new column that identifies and flags whether the row contains an SSB or TRS reference signal.

4
Map Receiver Ports to SNR

Create custom columns or utilize the 'Pivot Column' feature to map receiver ports (0 through 3) to their corresponding SNR values. Use the 'Trim' function if text indentation is causing misalignment.

5
Load the Transformed Table

Click 'Close & Load' to output the clean data into a spreadsheet table. If your original log file changes location, click the gear icon next to the 'Source' step in Applied Steps to update the file path.

File Path Updates: Updating the source file path in the query settings allows you to instantly refresh the data when analyzing new log files without rebuilding the entire query.
Free Microsoft Office alternative

Try WPS Office for Fast and Seamless Data Analysis

While complex Power Query steps are specific to Microsoft Excel, WPS Spreadsheet offers powerful, lightweight, and user-friendly data import and text-to-column tools that handle complex CSV and log files effortlessly.

  1. 1. Download WPS Office: Install WPS Office for free and open the WPS Spreadsheet application.
  2. 2. Import Your Log File: Go to the Data tab and select 'Import Data' to easily load your CSV or text log files.
  3. 3. Use Text-to-Columns: Highlight your imported log strings and use the Text-to-Columns feature to instantly separate your SNR values and receiver ports into structured data.
Fully compatible with Microsoft Excel (.xlsx, .csv, .txt) formats for seamless file sharing.Lightweight design ensures large text log files load quickly without system lag.Built-in Advanced Text-to-Columns wizards for fast and accurate data extraction.Free to download and use with a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

How do I fix misaligned SNR values caused by text file indentation in Power Query?

If all four receiver port values have the same indentation but misalign during import, highlight the column, navigate to the Transform tab, and click Format > Trim. This removes leading and trailing spaces before you split the columns, ensuring accurate mapping for your Rx ports.

How can I update the source file path when my log file location changes?

In the Power Query Editor, look at the 'Applied Steps' pane on the right side. Click the gear icon next to the 'Source' step, and browse to select the new file path before refreshing the query. This prevents the query from failing when you move the log files.

Can I parse telecom log files without using Power Query?

Yes. You can use scripting languages like PHP or Python to parse and extract the structured data into a standard CSV file, or you can use the built-in 'Text-to-Columns' feature available in applications like WPS Spreadsheet for straightforward delimiter-based logs.

What are SSB and TRS in telecom log files?

SSB (Synchronization Signal Block) and TRS (Tracking Reference Signal) are specific signal identifiers in 5G networks. In your text logs, filtering and identifying these reference signals allows you to analyze receiver port performance and SNR metrics independently for different signal types.