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

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

Reply
Anonymous
Not applicable

count rows with multiple condition

Hi

i have two tables here below. From the first table, i want to count the opp no. but just status of won,open and lost.

Then I want to calculate the average no. of opportunity by month (of just won, open and lost) by distinct count the "month/year" from date table so I can visualise the number as a card visual.   Please help me with this!

 

I want to count the number of opportunity id of just open, lost and in porocessI want to count the number of opportunity id of just open, lost and in porocessDates tableDates table

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi v-piga-msft. Thanks for your answer but that wasn't exactly the answer I was looking for.

 

I instead found out the funciton.

 

total opp = CALCULATE(COUNT('Opportunity'[Opp number]),'Opportunity'[Status]IN{"won","lost","did not proceed"})
 
Thanks.
 
 
 

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

Have you solved your problem?

 

If you have solved, please 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 feel free to ask.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi v-piga-msft. Thanks for your answer but that wasn't exactly the answer I was looking for.

 

I instead found out the funciton.

 

total opp = CALCULATE(COUNT('Opportunity'[Opp number]),'Opportunity'[Status]IN{"won","lost","did not proceed"})
 
Thanks.
 
 
 
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

If you only want to calculate the count of opportunity id of open, lost and in porocess.

 

You have two ways to achieve that.

 

1. Drag the Status column to filed and select Count.

count.PNG

Then unclick Won under visual level filter as below.

 

Untitled.png

 

2. Create the measure directly.

 

Count =
CALCULATE (
    COUNT ( 'Table1'[Opp no] ),
    FILTER ( 'Table1', 'Table1'[Status] <> "Won" )
)

Capture.PNG

 

If you want to calculate the average no. of opportunity by month, I'm afraid that you should have a relationship between the two tables, but I cannot find the date column in your first table so it seems that we cannot create the relationship between the two tables.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.