Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count comma in same cell

Hi guys, I have one collumn with location My collumn: LOCATION PORTUGAL SPAIN SPAIN PORTUGAL SPAIN SPAIN SPAIN PORTUGAL SPAIN ITALY ITALY FRANCE FRANCE ...
  • rohit_singh's avatar
    4 years ago

    Hi Anonymous,

    The simplest way of doing it is to simply add the location column to the table and change the aggregation to "Count". This will give you a count of each city. 

     

    However, if your requirement is to specifically create measures, you can create one like below :
     

    Madrid Count =

    COUNTROWS(
    FILTER(
    Locations,
    CONTAINSSTRING(Locations[LOCATION], "MADRID")
    )
    )

    You can modify this measure as per your requirement. Currently it is specific for Madrid but you can have a single measure to compute counts of each location as well.

    Kind regards,

    Rohit


    Please mark this answer as the solution if it resolves your issue.
    Appreciate your kudos! 🙂