Forum Discussion
Anonymous
7 years agoNot applicable
Linear Regression to predict values
Hello, I am trying to predict future values based on historical data. The new values are displayed in a matrix visual with future dates as the rows. Here is my code: linReg =
VAR Known =
...
v-lili6-msft
7 years agoCommunity Support
hi, Anonymous
Use ALLSELECTED, it will only calculate the date that has been filtered.
and for being counted as nulls instead of 0, if you could try to filter out blank value in the calculation.
and if not your case, Sample data and expected output would help tremendously.
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
Best Regards,
Lin
Anonymous
7 years agoNot applicable
ALLSELECTED is currently being used, but the result is still incorrect. Is there anywhere else that the code needs to be changed?
Also with the 0 sitution, I want them to be counted as 0 and not null values (as it would in excel). Please advise