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.
Having trouble getting a TotalYTD where I have a Forecast for the entire year loaded. The Forecast has SKU, QTY and DATE. The DATE is related to my Calendar table. What I want is to have the Forecast total for the year to date. Below is what I have tried thus far.
The data is pretty straight forward. see example below:
Date | Qty | SKU |
1/1/2019 | 100 | 12345 |
2/1/2019 | 200 | 12345 |
3/1/2019 | 200 | 12345 |
4/1/2019 | 200 | 12345 |
5/1/2019 | 200 | 12345 |
6/1/2019 | 200 | 12345 |
7/1/2019 | 500 | 12345 |
8/1/2019 | 500 | 12345 |
9/1/2019 | 500 | 12345 |
10/1/2019 | 500 | 12345 |
11/1/2019 | 500 | 12345 |
12/1/2019 | 500 | 12345 |
What I need to calculate is 1600, representing the forecast from January - TODAY. What I get is either 4100 using the first formula or Zero using the second formula.
Any help or direction in solving this would be much appreciated.
Solved! Go to Solution.
@knotpc solution is attached. just focus on forecast and calendar table and one measure
There are other tables in the files, just ignore those. cheers!!
Total YTD Upto Today = TOTALYTD( SUM( Forecast[Qty] ), 'Calendar'[Date], 'Calendar'[Date] <= TODAY() )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@knotpc solution is attached. just focus on forecast and calendar table and one measure
There are other tables in the files, just ignore those. cheers!!
Total YTD Upto Today = TOTALYTD( SUM( Forecast[Qty] ), 'Calendar'[Date], 'Calendar'[Date] <= TODAY() )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k how would you go about applying that same logic to SAMEPERIODLASTYEAR?
If you "cut off" the data for this year at TODAY, what is the best for retrieving the same range last year?
Thanks!
So here is my approach.
Total Units YTD = TOTALYTD( SUM( Forecast[Qty] ), 'Calendar'[Date], 'Calendar'[Date] <= TODAY() )
Total Units YTD SamePeriodLastYear = CALCULATE([Total Units YTD], SAMEPERIODLASTYEAR('Calendar'[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 |
---|---|
41 | |
19 | |
19 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |