cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## dax for sum of string

hi
i am tring to sum all the pos columns the columns are in string format.
i have tried countA as well but didnt work

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous

There is a way maybe more complicated, but you can sum the strings of the entire table . Calculate the strings in each column separately and then sum these counts .

For example :

POS 1-1 = COUNTA('The export'[POS 1])

POS 2-1 = COUNTA('The export'[POS 2])

POS 3-1 = COUNTA('The export'[POS 3])

……………

POS 11-1 = COUNTA('The export'[POS 11])

And then sum these counts

Total = CALCULATE('The export'[POS 1-1]+'The export'[POS 2-1]+'The export'[POS 3-1]+……………… +'The export'[POS 11-1])

You will get the sum of strings in table .

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 REPLIES 5
Community Support

Hi @Anonymous

There is a way maybe more complicated, but you can sum the strings of the entire table . Calculate the strings in each column separately and then sum these counts .

For example :

POS 1-1 = COUNTA('The export'[POS 1])

POS 2-1 = COUNTA('The export'[POS 2])

POS 3-1 = COUNTA('The export'[POS 3])

……………

POS 11-1 = COUNTA('The export'[POS 11])

And then sum these counts

Total = CALCULATE('The export'[POS 1-1]+'The export'[POS 2-1]+'The export'[POS 3-1]+……………… +'The export'[POS 11-1])

You will get the sum of strings in table .

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

@Anonymous , use countx in place of count

Anonymous
Not applicable

i tried count x it did work as well

Super User
Anonymous
Not applicable

i have tried first argument as countx as well
i have shared pbix file

Announcements