Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Item Count within a Cell

I am trying to count the number of items in a column that are seperated by comma delimiter. My DAX calculated column will not yield the correct item count. Where am I going wrong? 

 

Current DAX ->

Site Machine Count = LEN(MW2_WEDM[machine_list]) - LEN(SUBSTITUTE(MW2_WEDM[machine_list],",","")) + 1

 

Please reference the screenshot below. The resulting output is not getting the right count.

- EX: 3rd Dimension LLC -> machine_list = 2 items (Expected output count = 2 / My results = 3)

 

I found this previous post which is the exact same as the task I am trying to complete so I copied the syntax but am not getting the anticipated output needed. (https://community.powerbi.com/t5/Desktop/COUNT-WITHIN-A-CELL/m-p/319348#M142105

 

Any guidance will be greatly appreicated!

 

 

2 Replies