Forum Discussion
CountX with string does not contain "."
Hi all,
Bit of a newbie question here, Im trying to filter rows in the table where a row does not have a "." suffix on the end.
For example the table name "Table 1" with the Column name called "ElementID". Data type for ElementId is a string.
If we consider a dataset below:
ElementID
dddd.1111
gggg.3535
ggg
hhrt.agb
hhh
hogif.1345
I want a function that just returns the rows that do not have a ".suffix", in this instance "ggg" and "hhh". I'd like to count these rows and put it in a card visualisation.
I've managed to get all the count of all the rows as below:
count = COUNT('Table 1'[ElementID])
I've done some research on the containsstring function and CountX function, but i'm struggling to put them all in one function. Please see my attempt below. I know the containsstring function returns a bool but thats the extent of my knowledge.
count = COUNTX(FILTER(NOT(CONTAINSSTRING('Table 1' [ElementID], ".")
Any suggestions would be greatly appreciated.
Thanks in advance
Thank you much appreciated
2 Replies
- Greg_DecklerCommunity Champion
- jammo1234New Member
Thank you much appreciated