Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |