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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a column with folder paths, The root folders are sub divided and the divided folders are again subdivided and so on. i have some long strings in the column.
Now, I have to get the count of how many times a particular path has occurred in the whole column.
Example: I have the data exactly like this with couple hundered thousands of rows. The main path "c:\SHARE\Sample" must be counted couple hundered thousand times as it will be occurred in all of the other paths.
Folder 1 will be counted little less than the main path and so on for the folder 2,.. etc.
Any ideas are greatly appreciated. I can add the coulmn in power query or DAX. So both are an option for my case.
Thank you in advance
Hi @SriKandimalla ,
Try this, create column using the code below.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Column = var _string = Counter[Column1] var _countS = CALCULATE(COUNTROWS(Counter),FILTER(Counter,CONTAINSSTRING(Counter[Column1],_string))) return _countS
Proud to be a Super User!
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |