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.
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 Name | Month | Monthly Goal |
User A | 01-1-2018 | 9 |
User B | 01-1-2018 | 9 |
User C | 01-1-2018 | 9 |
User A | 02-1-2018 | 9 |
User B | 02-1-2018 | 9 |
User C | 02-1-2018 | 9 |
User A | 03-1-2018 | 9 |
User B | 03-1-2018 | 9 |
User A | 04-1-2018 | 9 |
User B | 04-1-2018 | 9 |
User D | 04-1-2018 | 2.5 |
User A | 05-1-2018 | 9 |
User B | 05-1-2018 | 9 |
User D | 05-1-2018 | 3 |
User E | 05-1-2018 | 2.25 |
User A | 06-1-2018 | 9 |
User B | 06-1-2018 | 9 |
User D | 06-1-2018 | 3 |
User E | 06-1-2018 | 2.25 |
Solved! Go to 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])))
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])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |