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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Forcasting TotalYTD for remaining of year

Hi all, 

 

I'm trying to get a graph that shows the total yearly cost using TotalYTD measure  and then when the data stops, forcast the cost for the rest of the year. The data I'm using for this is actually Azure spend. 

 

At the moment I have the measure 

       Cost YTD = TOTALYTD(sum('Usage details'[Cost]),'Usage details'[Date].[Date])
However, when this is added to line graph and I add a forcast, the forcast starts from the end of the year, not when the data in my table finishes (eg July)Annotation 105436.jpg

 

I'm sure this should be really easy, but I've looked at multiple forums and tried to follow other posts, but I can't get it to work. If I change the year end to be todays date, then the totals are wrong, because I only want the sum from 1/1/2020.
 
Any help much appreciated. I'm new to powerbi.
 

Cheers.

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi there.

First off, to be able to do what you want, you have to create a hybrid measure that will unify both, the real spend and the forecast. So, for some dates you'll want to show the real calculation and for some other the forecast.

Secondly, I'd advise strongly against using TOTALYTD and automatic date tables. I'm not going to explain why as it would take a whole chapter in a book. If you want to create easy and bug-free constructs... stay away from them, especially automatic date tables. Create your own.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi there.

First off, to be able to do what you want, you have to create a hybrid measure that will unify both, the real spend and the forecast. So, for some dates you'll want to show the real calculation and for some other the forecast.

Secondly, I'd advise strongly against using TOTALYTD and automatic date tables. I'm not going to explain why as it would take a whole chapter in a book. If you want to create easy and bug-free constructs... stay away from them, especially automatic date tables. Create your own.
Anonymous
Not applicable

I Don't See any solution here How it is marked Accepted.
Even I'm going through same problem.
understand the dates to be segregate for the actual and forcast sales but how to calculate the forcast sales number

Anonymous
Not applicable

OK, thanks @Anonymous . I'll try that.

Greg_Deckler
Community Champion
Community Champion

@Anonymous Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

 

All that said, you may find these helpful:

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008

 

Also this one:

https://community.powerbi.com/t5/Quick-Measures-Gallery/To-bleep-With-TOTALMTD/td-p/1250110



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks Greg for the links. I don't think the answer was on the Before you post.  

 

This is a sample data I get with the current measure

YearQuarterMonthDayCostCost YTD
2020Qtr 3July2114.684613474.819
2020Qtr 3July2214.684613489.504
2020Qtr 3July2314.684613504.189
2020Qtr 3July2414.684613518.873
2020Qtr 3July2514.684613533.558
2020Qtr 3July2614.621323548.179
2020Qtr 3July270.8863493549.066
2020Qtr 3July28 3549.066
2020Qtr 3July29 3549.066
2020Qtr 3July30 3549.066
2020Qtr 3July31 3549.066
2020Qtr 3August1 3549.066
2020Qtr 3August2 3549.066
2020Qtr 3August3 3549.066
2020Qtr 3August4 3549.066
2020Qtr 3August5 3549.066
2020Qtr 3August6 3549.066
2020Qtr 3August7 3549.066

 

What I would like is for the Cost YTD to stop when there is no cost for that date. Then be able to add a forcast for the dates that have no current cost until the end of the year.

 

YearQuarterMonthDayCostCost YTDForcast Value
2020Qtr 3July2114.684613474.819 
2020Qtr 3July2214.684613489.504 
2020Qtr 3July2314.684613504.189 
2020Qtr 3July2414.684613518.873 
2020Qtr 3July2514.684613533.558 
2020Qtr 3July2614.621323548.179 
2020Qtr 3July270.8863493549.066 
2020Qtr 3July28  3563.750179
2020Qtr 3July29  3578.434791
2020Qtr 3July30  3593.119403
2020Qtr 3July31  3607.804015
2020Qtr 3August1  3622.488627
2020Qtr 3August2  3637.17324
2020Qtr 3August3  3651.857852
2020Qtr 3August4  3666.542464

 

Cheers

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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