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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Calculating total number of opportunities from the start of the year to the current date

I am using the following formula to calculate the total number of opportunities from the start of the year to the current date but I am getting a value 333 which is the total number of opportunities in that entire year. I just want to see how many opportunites are there from example 1st Jan 2024 to Current date of 2024.

Running Total =
TOTALYTD(COUNT('opportunity'[Opportunity]), 'opportunity'[Est. close date])
 
Capture.PNG
 
what changes do I need to make to my DAX query to get the running total of opportunities till 4th of April which is the current date. 

Please help
1 ACCEPTED SOLUTION
Shreeram04
Resolver III
Resolver III

Hi @Anonymous ,

 

Try below measure

Running Total =
TOTALYTD(
COUNT('opportunity'[Opportunity]),
'opportunity'[Est. close date],
FILTER('opportunity', 'opportunity'[Est. close date] <= TODAY())
)

 

If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks,

Hari R

View solution in original post

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @Anonymous 
Modify the formula to 

Running Total = calculate(TOTALYTD(COUNT('opportunity'[Opportunity]), 'opportunity'[Est. close date]),opportunity'[Est. close date]<=today()
I prepared an example with my data it will look like this:
Ritaf1983_0-1712128538461.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Shreeram04
Resolver III
Resolver III

Hi @Anonymous ,

 

Try below measure

Running Total =
TOTALYTD(
COUNT('opportunity'[Opportunity]),
'opportunity'[Est. close date],
FILTER('opportunity', 'opportunity'[Est. close date] <= TODAY())
)

 

If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks,

Hari R

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric Community.