Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyeone,
I have created a combined column in my table which contains textcodes from multiple columns. It looks like this :
RCOM; RPOT; RAM*; RBC*; RCOM
I would like to be able to count, for example, the number of times where the RCOM textcode appears in my column. How can I do that ?
Solved! Go to Solution.
Hi @Anonymous,
Yes, the formula below should work in this scenario. ![]()
=List.Count(List.PositionOfAny(List.Transform(Text.Split(Text.Trim([Column1]),";"),each Text.Start( _ , 4)),{"RCOM"},Occurrence.All))
Regards
Hi @Anonymous,
Based on my test, you should be able to use the following M query to add a new custom column in Query Editor under Add Column tab to get the the number of times where the RCOM textcode appears in your column. ![]()
=List.Count(List.PositionOfAny(Text.Split(Text.Trim([Column1]),";"),{"RCOM"},Occurrence.All))
Regards
It works ! Thanks @v-ljerr-msft!
Do you think it's possible to do this on partial parts of text ?
If i have for example RCOM01, RCOM02, RCOM03, i would like to be able to count the number of times when "RCOM" appears...
Thank you again 🙂
Hi @Anonymous,
Yes, the formula below should work in this scenario. ![]()
=List.Count(List.PositionOfAny(List.Transform(Text.Split(Text.Trim([Column1]),";"),each Text.Start( _ , 4)),{"RCOM"},Occurrence.All))
Regards
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 72 | |
| 46 | |
| 35 |