Forum Discussion
VictorSunrise
2 years agoNew Member
Help to Count Number of Locations [Project Count]
I've been trying to count the number of projects in the locations table here, but nothing seems to work when commas are present. Is there any way to do this using CONTAINSSTRING? I don't want to ad...
- Anonymous2 years ago
Hi VictorSunrise ,
I made simple samples and you can check the results below:
Count = VAR _ADD = ADDCOLUMNS(ALLSELECTED('Table'),"Flag",IF(CONTAINSSTRING([Project Location],SELECTEDVALUE('DimProject Location'[Project Location])),1,0)) RETURN SUMX(_ADD,[Flag])Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
2 years agoVictorSunrise , I think this approach can help better
Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2