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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Khurramalidar
Frequent Visitor

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 @Khurramalidar ,

 

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 @Khurramalidar 
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

Shreeram04
Resolver III
Resolver III

Hi @Khurramalidar ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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