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
ahsanlhcgov
Helper III
Helper III

Showing percentage according to values in column

I have a small problem in showing percentages. 

I have a two colums which has Values

opportunities and Oppo_stage

I would like to show a percentage of opportunities 'lost'.

oppo_stage can only be won and lost.

Can someone please help me with that.

2 ACCEPTED SOLUTIONS
tringuyenminh92
Memorable Member
Memorable Member

Hi @ahsanlhcgov,

 

Please try like this, if it's not like what you expect, please kindly show me your sample data and i will suggest another approach

 

 

% Lost = DIVIDE(CALCULATE(COUNTROWS(Data),filter(ALL(data),Data[Oppo_Stage]="Lost")),CALCULATE(COUNTROWS(Data),ALL(Data)))

We will count all rows which is Lost and divive with all rows. In case you have additional filter by another column, you could use replace ALL by ALLEXCEPT method

 

2016-12-09_18h41_04.png2016-12-09_18h41_45.png

 

 

If this works for you please accept it as solution and also like to give KUDOS.

 

View solution in original post

hello @ahsanlhcgov

 

create a measure to count the opportunities loses

 

Opp-Lost-Count =
CALCULATE (
    DISTINCTCOUNT ( Opportunities[Opportunityid] ,;
    FILTER ( Opportunities, Opportunities[Stage] = "Lost" )
)

 Create a measure to divide by all opportunities

 

%Opp_lost =
DIVIDE (
    Opportunities[Opp-Lost-Count],
    DISTINCTCOUNT ( Opportunities[Opportunityid] )
)



Lima - Peru

View solution in original post

6 REPLIES 6
tringuyenminh92
Memorable Member
Memorable Member

Hi @ahsanlhcgov,

 

Please try like this, if it's not like what you expect, please kindly show me your sample data and i will suggest another approach

 

 

% Lost = DIVIDE(CALCULATE(COUNTROWS(Data),filter(ALL(data),Data[Oppo_Stage]="Lost")),CALCULATE(COUNTROWS(Data),ALL(Data)))

We will count all rows which is Lost and divive with all rows. In case you have additional filter by another column, you could use replace ALL by ALLEXCEPT method

 

2016-12-09_18h41_04.png2016-12-09_18h41_45.png

 

 

If this works for you please accept it as solution and also like to give KUDOS.

 

Hi, 

 

bi.PNG

i want to show the percentage of 'LOST' opportunities

also the values need to be distinct. the value 1146 is not distint. if I select distint it will show the value 1

hello @ahsanlhcgov

 

create a measure to count the opportunities loses

 

Opp-Lost-Count =
CALCULATE (
    DISTINCTCOUNT ( Opportunities[Opportunityid] ,;
    FILTER ( Opportunities, Opportunities[Stage] = "Lost" )
)

 Create a measure to divide by all opportunities

 

%Opp_lost =
DIVIDE (
    Opportunities[Opp-Lost-Count],
    DISTINCTCOUNT ( Opportunities[Opportunityid] )
)



Lima - Peru

brilliant. what I ended up doing is creating 3 measures but your solution was the basis for that. thanks alot for that.

ahsanlhcgov
Helper III
Helper III

bi.PNG

 

 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors