Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone!
I'm trying do do a measure thats results in a WinRate.
I have those tables (Calendar and Opportunities - from Salesforce).
In Opportunities table, i have 2 colunms, CreatedDate and CloseDate. CreatedDate is used to connect with Calendar Table.
The logical i want to calculate is:
Win Rate % = Numbers of Opps Created in period / Numbers of Opps Closed Won in the same period.
The denominator number is independent of created date. For example:
In august i had 200 opportunities created (no matter stage name);
In august i had 20 opportunities closed won (stage name = Closed Won and CloseDate = august) and doesnt matter the created date of those 20 opps.
Can anyone help me with this measure?
Thanks and regards from Brazil!
Solved! Go to Solution.
Hi, @Anonymous
see if this code helps
Win Rate % =
VAR TotalOppsCreated = CALCULATE(COUNTROWS(Opportunities), ALL(Calendar), VALUES(Calendar[MonthYear]))
VAR TotalWonOpps = CALCULATE(COUNTROWS(Opportunities),
FILTER(Opportunities,
Opportunities[StageName] = "Closed Won" &&
FORMAT(Opportunities[CloseDate], "MMMM") = VALUES(Calendar[MonthName]))
)
RETURN
DIVIDE(TotalWonOpps, TotalOppsCreated, 0)
Proud to be a Super User!
Hi, @Anonymous
see if this code helps
Win Rate % =
VAR TotalOppsCreated = CALCULATE(COUNTROWS(Opportunities), ALL(Calendar), VALUES(Calendar[MonthYear]))
VAR TotalWonOpps = CALCULATE(COUNTROWS(Opportunities),
FILTER(Opportunities,
Opportunities[StageName] = "Closed Won" &&
FORMAT(Opportunities[CloseDate], "MMMM") = VALUES(Calendar[MonthName]))
)
RETURN
DIVIDE(TotalWonOpps, TotalOppsCreated, 0)
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |