Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

FORMULA for counting rows

I've created the table below, which details all of our important Master Opportunities in Salesforce (11 total). Based on this information I want to provide the user with a % of those Opportunities that we've deemed "Power of One" (meaning involves agencies across our network). That total is 10.

 

Thus, the formula should should exhibiting 90.9% [10/11]. However, I'm not able to configure how to COUNT only the rows of the current visualized table- which again, is 11 (as opposed to the entire # of rows in the ENTIRE TABLE, which is 10K+). As you can see it's returning 100%.

 

Here's the current formula: 

% Po1 = count(Opportunity[Po1 (to use)]) / CALCULATE(countrows(Opportunity),ALLSELECTED(Opportunity[Name]))
 
I'm hoping to find how to count only the rows in the table I'm measuring against, NOT the entire table.
 
% of Po1 HELP.png
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@lbendlin 

I was able to resolve this with the following formula:

% Po1 = DIVIDE(CALCULATE(count(Opportunity[Po1 (to use)]),FILTER(Opportunity,Opportunity[Po1 (to use)]="*")),COUNT(Opportunity[Po1 (to use)]))

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

please explain your rationale for this part of the formula

 

count(Opportunity[Po1 (to use)])

 

Also please show the definition of that field.

Anonymous
Not applicable

@lbendlin 

1. count(Opportunity[Po1 (to use)])

Pertains to the first column in the table: it counts the # of Opportunities that have been designated Power of One

2. here's the formula: 

Po1 (to use) = IF(
    ISERROR(
        SEARCH("YES", Opportunity[Po1 ROLLUP])
    ),
    " ",
    "*"
)
3. The formula for "Opportunity[Po1 ROLLUP]" is as follows:
Po1 ROLLUP = CONCATENATE(Opportunity[Groupe_BUs_Involved__c], CONCATENATE(", ",(Opportunity[Multi PH Agency Opp])))
lbendlin
Super User
Super User

There's a lot of stuff going on. According to your formula "count(Opportunity[Po1 (to use)])" will completely ignore the result of your search and always return the number of rows regardless.  

 

SEARCH has built-in error handling. You don't need ISERROR.

 

your #3 looks rather complicated. Describe what the resulting string should look like. Most likely you can write

 

Po1 ROLLUP = Opportunity[Groupe_BUs_Involved__c] & ", " & Opportunity[Multi PH Agency Opp]

 

Anonymous
Not applicable

@lbendlin 

I was able to resolve this with the following formula:

% Po1 = DIVIDE(CALCULATE(count(Opportunity[Po1 (to use)]),FILTER(Opportunity,Opportunity[Po1 (to use)]="*")),COUNT(Opportunity[Po1 (to use)]))

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (29)