cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ahmad-KAISPE
Helper V
Helper V

Find specific text in a rows

Hi all,

I have SP list which contains multiple same text (like same name) in multiple columns.

Is it possible to to count specific text in a row in multiple columns?

 

Can someone please suggest me a possible solution?

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @Ahmad-KAISPE ,

Do you want to show number of duplicate value for each record? Do you want to type the specific text in a Text input control each time or you just want to see the number of a static text?

Where do you want to show this count number? In the Gallery or in the detailed screen?

Based on your description, I assume that:

1. You want to show the count number in the gallery of each item.

2. You want to show the count number based on the text entered in the Text input control.

I did a test on my side, you can refer to my steps:
1. This is my list:

v-albai-msft_0-1616065894818.png

2. Edit the first item in gallery, add a Text input control, a button and a label:

v-albai-msft_1-1616065894822.png

3. Set default property of Text input to blank:

v-albai-msft_2-1616065894824.png

4. Set OnChange property of button to(replace to your column name):

ClearCollect(EachItem,ThisItem);
ClearCollect(colnames,
Split(
    Left(
       Concat(EachItem,name1&", "&name2&", "&name3&", "&name4&", "&name5&","),
       Len(Concat(EachItem,name1&", "&name2&", "&name3&", "&name4&", "&name5&","))-1
    ),
    ", "
))

6. Set Text property of label to:

If(!IsBlank(TextInput1.Text),CountRows(Filter(colnames,Result=TextInput1.Text)))

v-albai-msft_3-1616065894829.png

See results below:

11.gif

 

You can also use above formula into the arrow button next to each record, to put this count number into the detailed screen.

Best Regards,

Allen

View solution in original post

4 REPLIES 4
v-albai-msft
Community Support
Community Support

Hi @Ahmad-KAISPE ,

Do you want to show number of duplicate value for each record? Do you want to type the specific text in a Text input control each time or you just want to see the number of a static text?

Where do you want to show this count number? In the Gallery or in the detailed screen?

Based on your description, I assume that:

1. You want to show the count number in the gallery of each item.

2. You want to show the count number based on the text entered in the Text input control.

I did a test on my side, you can refer to my steps:
1. This is my list:

v-albai-msft_0-1616065894818.png

2. Edit the first item in gallery, add a Text input control, a button and a label:

v-albai-msft_1-1616065894822.png

3. Set default property of Text input to blank:

v-albai-msft_2-1616065894824.png

4. Set OnChange property of button to(replace to your column name):

ClearCollect(EachItem,ThisItem);
ClearCollect(colnames,
Split(
    Left(
       Concat(EachItem,name1&", "&name2&", "&name3&", "&name4&", "&name5&","),
       Len(Concat(EachItem,name1&", "&name2&", "&name3&", "&name4&", "&name5&","))-1
    ),
    ", "
))

6. Set Text property of label to:

If(!IsBlank(TextInput1.Text),CountRows(Filter(colnames,Result=TextInput1.Text)))

v-albai-msft_3-1616065894829.png

See results below:

11.gif

 

You can also use above formula into the arrow button next to each record, to put this count number into the detailed screen.

Best Regards,

Allen

View solution in original post

Thanks for your response.

Actually I want to show total count of each specific text in a pie chart.

or


Is it possible to merge all columns data in a new column so I can count each duplicate text  separately?

 

Best Regards,
Ahmad

Hi @Ahmad-KAISPE ,

About how to merge all columns data into a new column, you can use below formula(replace to your listname and columnname):

Split(
Left(Concat(list7,name1&", "&name2&", "&name3&", "&name4&", "),
Len(Concat(list7,name1&", "&name2&", "&name3&", "&name4&", "))-2),
", ")

Result like below:

捕获.PNG

About how to show total count of each specific text in a pie chart, you can refer to my answer in below thread:

Pie Chart from SharePoint List - Power Platform Community (microsoft.com)

If you still have issue about this question, don't hesitate to let me know.

Best regards,

Allen

 

Thanks again v-albai-msft for your response.

It solved this thread question.

Regards,
Ahmad

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,276)