Forum Discussion
Count of Rows which Contain Term?
This seems like it should be really simple, but I'm having a difficult time finding the answer.
I have a bunch of survey responses from from an testing group that I want to organize:
- One of the columns in this data set is the users feedback, which is a string of text the user provided
- I want to be able to show a show a visual which shows the number of complaints which contain a given term (slow, frozen, crash, etc.).
- Example: Total 1000 responses. 200 contain "slow", 5 contain "frozen", 5 contain "crash".
For the purpose of this question you can assume my data set has two columns, responder age and feedback string.
(Some feedback strings may contain more than one of my key terms.)
Thanks!
6 Replies
- v-piga-msftResident Rockstar
Hi lamp38,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some data sample and your desired output so that we could get the solution more quickly.
Best Regards,
Cherry
- Ashish_MathurSuper User
Hi,
Sounds like an interesting one to solve. Share some data and show the expected result. Especially show cases where the feedback string has multiple key terms and your expected result for those cases.
- lamp38New Member
Imagine we have the following rows:
- Complaint 1: "App is very slow."
- Complaint 2: "App loads slowly."
- Compaint 3: "The app was very slow, and then crashed."
I have to be able to summarize the data as follows:
- Count (slow) = 3
- Count (crashed) = 1
- AlBCommunity Champion
Hi lamp38
Try this:
1. Create a one-column table Terms in which you have the terms you want to look for
2. Place Terms[Term] on the rows of a matrix visual
3. Place this measure in values of the matrix:
Measure = VAR _CurrentTerm = SELECTEDVALUE ( Terms[Term] ) RETURN COUNTROWS ( FILTER ( Table1, FIND ( _CurrentTerm, Table1[feedback string], 1, 0 ) > 0 ) )