Forum Discussion

Jason2500's avatar
Jason2500
Icon for Helper I rankHelper I
5 years ago
Solved

How to sum the particular text in the String column using dax measures?

Hi

 

I am having a text column as follow

 

Text

Apple

Carrot

Apple

Carrot

Beans

Kiwi

Beans

Kiwi

 

I need to create a separate card for each fruit. How to sum the total number of apple or carrot etc present in the column using dax measures?

 

I need to create separate DAX measures for each fruit.

 

Please advise

 

  • Jason2500 ,

    Apple = countx(filter(Table, Table[Fruit]="Apple"), Table[Fruit])

     

    Hope, this is what you need

4 Replies

    • Jason2500's avatar
      Jason2500
      Icon for Helper I rankHelper I

      Hi amitchandak  Thanks for your quick reply. Can you please tell me how to create the measure using dax function?

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Jason2500 ,

        Apple = countx(filter(Table, Table[Fruit]="Apple"), Table[Fruit])

         

        Hope, this is what you need