Power Query MAGIC! ⚑Auto-Categorize Text Like a PRO! @chandoo_
Power Query MAGIC! ⚑Auto-Categorize Text Like a PRO!  @chandoo_
Uploaded March 2025 | Updated November 2026, 23 hours ago
A Power Query PRO trick to help us clean and "automatically tag" data based on a rules table. This time-saving automation has been helping me a lot with "rules-based text classification" and I am excited to share it with you.

What you are going to learn πŸ’‘
========================

1) The challenge of "tagging" or "categorization" based on rules table.
2) Using Text.Contains and the limitation
3) Introducing "loops" ♾️ in Power Query with List.Accumulate()
4) Using List.Accumulate with a custom function
5) How to convert our rules logic into an invokable M function for future uses
6) Enhancement ideas

Sample file πŸ“‚
============

chandoo.org/wp/wp-content/uploads/2025/03/expense-categorization.xlsx


Video Timestamps πŸ•
===================
0:00 - The ultimate Power Query time-saver trick
1:20 - Loading the data into Power Query
2:20 - Solving for one line item - understanding the logic
4:01 - Using Text.Contains and the limitation
4:55 - List.Accumulate - What is it and how to use it
11:30 - Converting the logic to a Power Query function
19:25 - Ways to enhance the functionality


πŸ’°$50 Discount on My Power Query, Power Pivot & Power BI course πŸ€‘
==========================================================

If you like this magic show, you are going to LOVE my online, self-paced Power BI course. It helps you unlock the hidden powers & secrets of Power Query, M language, Power Pivot, DAX & Power BI report building. Visit chandoo.org/wp/power-bi-course

Use Coupon code SAVE50 to get $50 (or Rs 3,000) discount.

~


#powerquery #chandoo
Power Query MAGIC! ⚑Auto-Categorize Text Like a PRO!Stop Dragging in Excel, there is a BETTER way!UNPIVOT: Data Cleaning Power Tricks πŸ’‘Powerful trick to get data from any folder in Excel (works even after renaming!)Excel formula to get CLOSEST Matching ValueIntroducing Free Data Analyst Course - SQL / Excel / Power BI / Python3 Things I do in my new Job to Succeed as a Data Analyst3 Powerful Data Slides for your NEXT Presentation (Free PPT File)Excel PROs use these hidden features to work faster πŸš€Test Your SQL Skills With These Real Interview Questions!FILTER Function Hacks That Save Hours of WorkPower Query - Beginner to PRO Masterclass in 30 minutes
Chandoo |

Power Query MAGIC! ⚑Auto-Categorize Text Like a PRO!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER