Forum Discussion
Using Run Rate to Forecast Performance
- 6 years ago
I can make it easy for you. DM me and I'll give you my bank account and you can send me the balance of the money. 😂
Seriously, try this:VAR varCurrentDay = MAX( 'Table'[Day] ) VAR varAverageSpend = CALCULATE( AVERAGE( 'Table'[Cash Flow] ), FILTER( ALL( 'Table'[Day] ), 'Table'[Day] > 0 && 'Table'[Day] <= varCurrentDay ) ) * -1 VAR varRemainingSpend = CALCULATE( SUM( 'Table'[Cash Flow] ), FILTER( ALL( 'Table'[Day] ), 'Table'[Day] <= varCurrentDay ) ) VAR Result = DIVIDE( varRemainingSpend, varAverageSpend, 0 ) RETURN ResultIt returns this visual
My PBIX file is here if you want to see what I did. I made the Day count an integer as I needed to use that to filter the data. You can see in the measure that each variable is fairly simple in what it does - one gets the current day, the next the average through that day, then the total spend, then finally it does the division.
If you need further help, see links below to provide data. We cannot use screenshots for data. Great for expected results, but we have to retype stuff for source data.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
edhans I am trying to calculate the count of days between todays date and 2/16/23. I would like that count to update each day. Any thoughts on how I can accomplish that?
- edhans6 years agoCommunity Champion
This will do that.
Measure = DATEDIFF( TODAY(), DATE(2023,2,16), DAY )Today it shows 941 days.