cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KimberlyM
Level 8

CountIf - Building a simple report to show counts of items in a list based on a specific name

Good day! I am hoping someone might be able to offer some insight that I seem to be overlooking as my code just doesn't want to do anything for me!

"Phone - Sign: " & CountIf(Lead_Data, AssignedTo.Value = "AgentsName.SelectedText.Value" || LeadMember1.Value = "AgentsName.SelectedText.Value" || LeadMember2.Value = "AgentsName.SelectedText.Value" || LeadMember3.Value = "AgentsName.SelectedText.Value" || LeadMember4.Value = "AgentsName.SelectedText.Value" && CreatedMonthYear = "Nov 19" && SourceDetails.Value = "Sign Call")

I have a drop  down that pulls a list of names from a SharePoint list called AgentsName. I am trying to say if the AgentsName selected in the dropdown matches what is in the SharePoint list column AssignedTo, LeadMember1, LeadMember2, LeadMember3, or LeadMember4 then count it. Also ensure that the CreatedMonthYear column states Nov 19 and the SourceDetails column states Sign Call.

I felt that this was a pretty basic formula but I seem to have gone wrong somewhere as I can only get it to keep reporting zeros. I am not experiences any errors displaying in my code.

AssignedTo, LeadMember1-4 and SourceDetails are choice columns. CreatedMonthYear is a calculated field pulling the month and year from the Created column.

Thanks in advance for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
KimberlyM
Level 8

Re: CountIf - Building a simple report to show counts of items in a list based on a specific name

Figured this one out on my own. My first error was that I had quotes around part of the formula that did not need quotes. Oops. Secondly, I did not need to use && only a "," in this situation because of the way CountIf works. "," separates conditions in this formula.

"Phone - Sign: " & CountIf(Lead_Data, AssignedTo.Value = AgentName.Text || LeadMember1.Value = AgentName.Text || LeadMember2.Value = "AgentName.Value" || LeadMember3.Value = "AgentName.Value" || LeadMember4.Value = "AgentName.Value", CreatedMonthYear = "Nov 19", SourceDetails.Value = "Sign Call")

View solution in original post

1 REPLY 1
KimberlyM
Level 8

Re: CountIf - Building a simple report to show counts of items in a list based on a specific name

Figured this one out on my own. My first error was that I had quotes around part of the formula that did not need quotes. Oops. Secondly, I did not need to use && only a "," in this situation because of the way CountIf works. "," separates conditions in this formula.

"Phone - Sign: " & CountIf(Lead_Data, AssignedTo.Value = AgentName.Text || LeadMember1.Value = AgentName.Text || LeadMember2.Value = "AgentName.Value" || LeadMember3.Value = "AgentName.Value" || LeadMember4.Value = "AgentName.Value", CreatedMonthYear = "Nov 19", SourceDetails.Value = "Sign Call")

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,669)