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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 19 | |
| 12 | |
| 10 |