Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
Solved! Go to Solution.
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
If this works for you please accept it as solution and also like to give KUDOS.
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] ) )
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
If this works for you please accept it as solution and also like to give KUDOS.
Hi,
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] ) )
brilliant. what I ended up doing is creating 3 measures but your solution was the basis for that. thanks alot for that.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |