ADVERTISEMENT
  • About
  • Advertise
  • Privacy & Policy
  • Contact
Office Learner
ADVERTISEMENT
  • Home
  • Excel
  • Word
  • PowerPoint
  • Outlook
  • Microsoft Copilot
  • Power BI
  • Microsoft 365
  • Microsoft Teams
  • OneNote
No Result
View All Result
  • Home
  • Excel
  • Word
  • PowerPoint
  • Outlook
  • Microsoft Copilot
  • Power BI
  • Microsoft 365
  • Microsoft Teams
  • OneNote
No Result
View All Result
Office Learner
No Result
View All Result
Home Power BI

Reverse a text label for a diagnostic Power Query check

Tanjila Rashid by Tanjila Rashid
November 28, 2026
in Power BI
0
Reverse a text label for a diagnostic Power Query check
0
SHARES
1
VIEWS
Share on FacebookShare on Twitter

Reverse a text label for a diagnostic Power Query check

Text.Reverse returns the characters of a text value in reverse order in Power Query. For example, Text.Reverse("AB-12") returns "21-BA". Use a separate custom column when you want to inspect this transformation without replacing the original label. Reversing text can be a useful small diagnostic or teaching exercise, but it does not encrypt information, validate an identifier, or repair a code with an unknown format. Keep the task narrow and check the character-level result beside the source.

Choose a deliberately simple text sample

Create a practice table with a Label column and the values AB-12, BOX, 120, and LEVEL. These are ordinary Latin letters, digits, and punctuation chosen so that you can predict the reversal by inspection. Treat 120 as text, not as a number. If a source system converted an identifier to a numeric value and removed leading zeroes, reversing the remaining characters cannot restore the lost information. The input representation is part of the problem. Set and inspect the data type before drawing conclusions from the output.

ADVERTISEMENT

This example uses Power Query Editor in Power BI Desktop and the documented M function Text.Reverse. It is not a DAX expression and does not belong in a report measure. Power Query experiences in other Microsoft products may expose different interface paths, although the M function's purpose remains the same. The steps are based on documentation rather than a claim of hands-on verification in your installed build. Microsoft's function reference supports the core transformation; the practice cases and diagnostic routine here are original examples designed to make its limits visible.

Add a result column that preserves the input

Use Enter Data to make the small Labels table, then open it in Power Query Editor. Confirm that Label has a text data type. Add a custom column named Reversed label and enter Text.Reverse([Label]). Commit the expression and inspect the preview. AB-12 should become 21-BA, BOX should become XOB, and the text 120 should become 021. LEVEL should remain LEVEL because its character sequence reads the same in both directions. That unchanged result is not evidence that the function failed. It is an expected property of this particular input.

Keep Label and Reversed label next to each other while reviewing. Read the original from right to left and compare each output character. The hyphen in AB-12 moves with the sequence; it is not a delimiter that the function interprets as a special boundary. Text.Reverse operates on the supplied text rather than understanding which portion is a category and which portion is a serial number. If your business rule requires swapping two fields around a delimiter, specify that different task explicitly instead of assuming that complete character reversal will accomplish it.

Use a second reversal as a diagnostic

Add another custom column named Round trip using Text.Reverse([Reversed label]). For the simple ASCII examples, the second reversal should reproduce the original text. Check the text 120 carefully: its first reversal contains a leading zero, and the second returns 120. If you insert a numeric conversion between the reversals, you can lose the leading zero in 021. The resulting round trip would then expose a type-change problem. This makes the exercise useful for teaching why an identifier represented by digits may still need to remain text.

A successful round trip does not prove that the data is correct, complete, or private. It only checks a specific property of this transformation on the chosen values. AB-12 could be a mistyped label and still reverse twice perfectly. Likewise, anyone who sees a reversed value can reverse it again. Do not use this method to hide passwords, personal information, or confidential codes. If the task requires privacy protection, follow an appropriate established process rather than describing a reversible character rearrangement as security.

Investigate exceptions before replacing errors

If the custom column shows Error, inspect the message and the source type. A non-text value or a changed column name can explain the problem. Do not immediately replace every error with blank text; that can conceal an upstream schema change. The documented function accepts nullable text, so a null input is a separate case from a text value containing zero characters. If missing values matter in your actual query, add explicit test cases and record how they are represented. A visually empty preview cell is not enough to establish that two inputs have identical meaning.

For this beginner exercise, stay with the simple characters provided. Human writing can contain combining marks, multi-code-point symbols, and scripts whose display behaviour makes reversal more complicated than a line of English letters. Do not generalize the sample into a claim about reversing every language correctly for display. If your real task involves international text, define the intended behaviour and use suitable Unicode-aware tooling and tests. A function that produces an output is not automatically performing the linguistic operation a reader expects from the word reverse.

Decide whether the diagnostic belongs in the final model

After inspecting the practice results, explain what each added column demonstrates. Keep the round-trip check in a learning query if it helps, but avoid loading unnecessary diagnostic columns into a production model without a reason. Name applied steps clearly so another editor can follow the sequence. As a final exercise, predict the reversals of A-007, red tray, and AAA before refreshing. Which cases change visibly, and which preserve their appearance? The useful outcome is a controlled understanding of a text operation, including its type assumptions and its very limited role as a data-quality check.

Sources and related reading

Primary reference and scope

Split a Combined Code in Power BI Power Query

Tags: Power BIpractical guide
ADVERTISEMENT
Previous Post

Rotate a PowerPoint direction arrow to an exact angle

Next Post

Print one OneNote web page as a reference handout

Tanjila Rashid

Tanjila Rashid

Next Post
Print one OneNote web page as a reference handout

Print one OneNote web page as a reference handout

ADVERTISEMENT
  • Trending
  • Comments
  • Latest
10 Microsoft 365 Copilot Features That Transform Word and Outlook in 2025

8 Hidden Excel Features That Power Users Swear By (2026 Edition)

October 8, 2026
PowerPoint Morph Transition Masterclass: Create Cinematic Animations in 2026

PowerPoint Morph Transition Masterclass: Create Cinematic Animations in 2026

October 8, 2026
Excel GROUPBY & PIVOTBY: The New Array Functions That Replace PivotTables

Excel GROUPBY & PIVOTBY: The New Array Functions That Replace PivotTables

October 8, 2026
Excel PIVOTBY Function in 2026: The Ultimate Guide to Dynamic Pivot Analysis Without Pivot Tables

Excel PIVOTBY Function in 2026: The Ultimate Guide to Dynamic Pivot Analysis Without Pivot Tables

October 8, 2026
Spreadsheet Layout

What is spreadsheet? and how it works!

0
Spreadsheet Layout

Spreadsheet Layout

0
Spreadsheet Layout

IF function of Google Sheets – usage and formula examples

0

5 Google Sheets tricks that you always need!

0
Apply strikethrough to a withdrawn instruction in OneNote for the web

Apply strikethrough to a withdrawn instruction in OneNote for the web

November 28, 2026
Remove decorative hyphens from a copied label with Power Query Text Remove

Remove decorative hyphens from a copied label with Power Query Text Remove

November 28, 2026
Remove a transition from one PowerPoint slide

Remove a transition from one PowerPoint slide

November 28, 2026
Convert an all capitals Word heading to sentence case

Convert an all capitals Word heading to sentence case

November 28, 2026

Recent News

Apply strikethrough to a withdrawn instruction in OneNote for the web

Apply strikethrough to a withdrawn instruction in OneNote for the web

November 28, 2026
Remove decorative hyphens from a copied label with Power Query Text Remove

Remove decorative hyphens from a copied label with Power Query Text Remove

November 28, 2026
Remove a transition from one PowerPoint slide

Remove a transition from one PowerPoint slide

November 28, 2026
Convert an all capitals Word heading to sentence case

Convert an all capitals Word heading to sentence case

November 28, 2026
Office Learner

OfficeLearner is a place where you can learn PowerPoint, Excel, Word Data Analysis, and other Office related programs. We provide tips, how to guide and also provide Excel solutions to your business problems

Follow Us

DMCA.com Protection Status

Browse by Category

  • Clipchamp
  • Excel
  • Google Sheets
  • Loop
  • Microsoft 365
  • Microsoft Copilot
  • Microsoft Designer
  • Microsoft Forms
  • Microsoft Loop
  • Microsoft Sway
  • Microsoft Teams
  • Microsoft Viva
  • Microsoft Whiteboard
  • OneDrive
  • OneNote
  • Outlook
  • Planner
  • Power Apps
  • Power Automate
  • Power BI
  • PowerPoint
  • SharePoint
  • Teams
  • Visio
  • Word

Recent News

Apply strikethrough to a withdrawn instruction in OneNote for the web

Apply strikethrough to a withdrawn instruction in OneNote for the web

November 28, 2026
Remove decorative hyphens from a copied label with Power Query Text Remove

Remove decorative hyphens from a copied label with Power Query Text Remove

November 28, 2026
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2022 OfficeLearner - Free Excel, PowerPoint & Word Tutorial & Online Courses

No Result
View All Result

© 2022 OfficeLearner - Free Excel, PowerPoint & Word Tutorial & Online Courses

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.