Forum Discussion
Get estimated value for future months
- Anonymous1 year ago
Hi, Anonymous
You can try the following methods.
Utfall ack = Var _Sum=CALCULATE(SUM('Table'[Utfall]),FILTER(ALL('Table'),[Month Number]<=MAX('Table'[Month Number]))) RETURN IF(SELECTEDVALUE('Table'[Utfall])=BLANK(),BLANK(),_Sum)Estimated = Var _maxmonth=CALCULATE(MAX('Table'[Month Number]),FILTER(ALL('Table'),[Utfall]<>BLANK())) Var _avg=DIVIDE(CALCULATE(SUM('Table'[Utfall]),ALL('Table')),_maxmonth) Var _previous=CALCULATE([Utfall ack],FILTER(ALL('Table'),[Month Number]=_maxmonth)) RETURN IF(SELECTEDVALUE('Table'[Utfall])=BLANK(),_previous+(MAX('Table'[Month Number])-_maxmonth)*_avg,BLANK())Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
You can try the following methods.
Measure =
Var _maxmonth=CALCULATE(MAX('Table'[Month num]),FILTER(ALL('Table'),[Utfall]<>BLANK()))
Var _avg=DIVIDE(CALCULATE(SUM('Table'[Utfall]),ALL('Table')),_maxmonth)
Var _previous=CALCULATE(SUM('Table'[Utfall ack]),FILTER(ALL('Table'),[Month num]=_maxmonth))
RETURN
_previous+(MAX('Table'[Month num])-_maxmonth)*_avg
Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! I tried your measure but it did not quite work. I used the month column from the table instead of the regular date table. It seems like the estimated shows correct from month 5, but it adds the avg to the 'Utfall' instead of 'utfall ack'
"
- Anonymous1 year agoNot applicable
Hi, Anonymous
What kind of output do you expect from the test data you just provided? Please show it in Excel.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous1 year agoNot applicable
Okey so i have the data below, with only Utfall for Jan - April
I will then write a measure that sums all sales values for previous month named Utfall ack. For all future months without sales i want to have an estimated sales value based on Utfall ack. So for May i want utfall ack from April = 100 + avg sales Jan-apr = 25, so 125. For June I then want the May value 125 + avg sales Jan-may, 150, and so on. And when the real sales for may comes the utfall ack should show instead of estimated may value
- Anonymous1 year agoNot applicable
Hi, Anonymous
You can try the following methods.
Utfall ack = Var _Sum=CALCULATE(SUM('Table'[Utfall]),FILTER(ALL('Table'),[Month Number]<=MAX('Table'[Month Number]))) RETURN IF(SELECTEDVALUE('Table'[Utfall])=BLANK(),BLANK(),_Sum)Estimated = Var _maxmonth=CALCULATE(MAX('Table'[Month Number]),FILTER(ALL('Table'),[Utfall]<>BLANK())) Var _avg=DIVIDE(CALCULATE(SUM('Table'[Utfall]),ALL('Table')),_maxmonth) Var _previous=CALCULATE([Utfall ack],FILTER(ALL('Table'),[Month Number]=_maxmonth)) RETURN IF(SELECTEDVALUE('Table'[Utfall])=BLANK(),_previous+(MAX('Table'[Month Number])-_maxmonth)*_avg,BLANK())Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.