Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I'm having a dataset of costs and would like to forecast the costs based on the average IS-values (Sum of Gesamtkosten) of the past four weeks based per type of cost (Kostenposten).
I've been trying to work sth. out like
Hi @Kugelianer91 ,
I have created a simple sample, please refer to it to see if it helps you.
Create a column first.
weeknum = WEEKNUM('Table'[date],2)
Then create a measure.
Measure =
VAR _4weeks =
MAX ( 'Table'[weeknum] ) - 3
RETURN
AVERAGEX (
FILTER (
ALL ( 'Table' ),
'Table'[weeknum] >= _4weeks
&& 'Table'[weeknum] <= SELECTEDVALUE ( 'Table'[weeknum] )
),
'Table'[desamtosten]
)
If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy inforamtion.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Kugelianer91 , You need to take the help of the date table and week rank. Hope you mean continuous Week
new columns in date table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
Avg Last 4 weeks = CALCULATE(Averagex(Values('Date'[Week Rank]), [Your Measure]) , FILTER(ALL('Date'),'Date'[Week Rank]>=max('Date'[Week Rank])-4 && 'Date'[Week Rank]<=max('Date'[Week Rank])))
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Hi,
thank you very much for the quick reply. Very glad to have such a responsive support.
Would it be possible reset the Forecast for different types aka "Kostenposten".
Currently I find Forecast-Values though there ain't no IS-Values at other "Kostenposten".
I have attached a screenshot where I calculated the scenarios exemplary.
Unfortunately I was unable to attach a pbix file.
Thank you very much in advance.