Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
How can I find the total number of times a character occurs within a string.
It can be in DAX or M Query
For example I have a column which has values like
JJAAA, JAJAJ, JJJJJ ..etc
Now I want to find number of times character J is present in each string
JJAAA - 2
JAJAJ - 3
JJJJJ - 5
Thanks,
Mannu
Solved! Go to Solution.
Include a column and use the below formula:
NumberofJs = LEN(Table3[StringText])-LEN(SUBSTITUTE(Table3[StringText],"J",""))
Include a column and use the below formula:
NumberofJs = LEN(Table3[StringText])-LEN(SUBSTITUTE(Table3[StringText],"J",""))
User | Count |
---|---|
107 | |
88 | |
81 | |
76 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |