cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
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
Highlighted
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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,375)