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
phamilton
Frequent Visitor

Calculate YTD Goal based on current month

I have a goals table for my team which has a monthly goal per user.  I need a way to show the goal YTD in a report so that I can compare it to the actuals.

 

Currently I have a goals table in my data set which has the user name, date and goal for every month of the current year.  I am struggling to get the report to show the goal up to the current period in the year.

 

Any help would be greatly appreciated!

 

Sample of dataset below

 

User NameMonthMonthly Goal
User A01-1-20189
User B01-1-20189
User C01-1-20189
User A02-1-20189
User B02-1-20189
User C02-1-20189
User A03-1-20189
User B03-1-20189
User A04-1-20189
User B04-1-20189
User D04-1-20182.5
User A05-1-20189
User B05-1-20189
User D05-1-20183
User E05-1-20182.25
User A06-1-20189
User B06-1-20189
User D06-1-20183
User E06-1-20182.25
1 ACCEPTED SOLUTION

Yes it is the sum of all the goals up to the current date.  I have actually found the solution. 

 

Using the following IF statement in the measure did the trick.  Thanks to Sam McKay at EnterpriseDNA for the solution.

 

IF (LASTDATE(Dates[Date]) > TODAY(), BLANK(), CALCULATE([Total Goal], DATESYTD(Dates[Date])))

View solution in original post

2 REPLIES 2
msornakumar
Advocate III
Advocate III

Hi ,

 

  How to calcuate the goal YTD ? Is it SUM of the goals till current month or How it needs to be calculated ?

Yes it is the sum of all the goals up to the current date.  I have actually found the solution. 

 

Using the following IF statement in the measure did the trick.  Thanks to Sam McKay at EnterpriseDNA for the solution.

 

IF (LASTDATE(Dates[Date]) > TODAY(), BLANK(), CALCULATE([Total Goal], DATESYTD(Dates[Date])))

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.