I wish to count the number of times a piece of text appears in a column. I only want to display that number on a chart. I've tried the following:
FIND("Text", [Book Name])
"Text" is the text I am looking for, [Book Name] is the name of the column to search.
It does produce a good return but when I display it on a chart, it also shows the number of times it didn't appear. I only want to show the times it did appear. Is there a way to filter out the number of times it doesn't find the text so it doesn't appear. Thank you.
COUNT(
Select(
TABLE[Book Name],
[Book Name] = "Text"
)
)
That showed an error. Sorry, should have said, I have made a virtual column with a formula of " FIND("Text", [Book Name]) ". The item it is searching is an enumList. As i say, it does produce the number but also counts the number of times it doesn't appear. So I can 2 number - 1 for yes 0 for No. So the chart shows to columns 1's and 0's.
I only want to display the items that have the text.
I've done it this way so I can add further column to the same chart.
I'm probably doing it a complicate way but that's how I learn things.
Please post the column type and config of [Book Name] as well as some sample content
Hi SkrOYO, Attached is images of the data and how I've set it up. So the desired result would be a column that will produce a sum of the number of times the word "Text" is found within the Book Name list. I count 5. This would then allow me to add that total to a chart. I would then be able to create another virtual column looking for Leaf, then add that column also to the chart. That would be 2. Hope that clarifies what I am trying to do.
https://support.google.com/appsheet/answer/10108197
Find is not the tool for the job
I'll do some testing and come back with suggestions. I think @MultiTech already showed the best way
You want to check if there is any word inside the [Book Name] that might have more words rather than just the one you are looking for or the text you will be checking is all of the content of the [Book Name]?
Examples
A. "Texting something" in "Texting something is awesome" is true and "Texting something awesome" in "Texting something is awesome" is true
B. "Texting something" in "Texting something is awesome" is false and "Texting something awesome" in "Texting something is awesome" is true
Try this, if you're wanting to count how many times the word appears in a text column:
COUNT(
SPLIT(
[Text_Column_Here],
"WORD_TO_COUNT"
)
) - 1
FIND only looks once, you need to use SPLIT()
That doesn't give the desired result. Result shown below.
That does work yes. What if I know want the results of an EnumList. IE, you select 3 books. Say I changed the [Book Name] column into an EnumList, you select the titles you want and it then has to check the number of times "Text" was in the result.
Wrap your enumlist in Concatenate()
COUNT(
SPLIT(
Concatenate([Enumlist_Column_Here]),
"WORD_TO_COUNT"
)
) - 1
Now that does give much better results. How can I remove the '0' and '1' labelling and change them to something like "Not Found" and "Text Found"
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
4 |