Daniil
8 years agoKudo Kingpin
Simple Linear Regression
This measure allows you to predict dependent values Y from independent values X.
NAME:
Simple linear regression
DESCRIPTION:
Estimate Y values based on X values.
PARAMETERS:
N...
Daniil
8 years agoKudo Kingpin
Tony, you should visit the local Power BI User Group if you get a chance :-) The next meeting date should be announced at Meetup soon.
Try the following measures:
Starting Temperature =
VAR Estimate =
SELECTCOLUMNS (
KEEPFILTERS ( ALLSELECTED ( 'cetdata'[YEAR] ) ),
"Estimate[X]", 'cetdata'[YEAR],
"Estimate[Y]", [Estimated]
)
VAR First =
TOPN ( 1, Estimate, Estimate[X], ASC )
RETURN
MINX ( First, Estimate[Y] )
Ending Temperature =
VAR Estimate =
SELECTCOLUMNS (
KEEPFILTERS ( ALLSELECTED ( 'cetdata'[YEAR] ) ),
"Estimate[X]", 'cetdata'[YEAR],
"Estimate[Y]", [Estimated]
)
VAR Last =
TOPN ( 1, Estimate, Estimate[X], DESC )
RETURN
MAXX ( Last, Estimate[Y] )
Temperature Difference = [Ending Temperature] - [Starting Temperature]
tonymaclaren
8 years agoHelper I
Dear Daniil
Thank you very much--all working perfectly now. KEEPFILTERS did the trick.I have really learned a lot! I have now ordered the SQLBI book.
One strange thing however,The [Estimated] measure which is your Simple linear Regression measure produces a total if displayed in a table. I do not quite understand this.
Best Regards
and thanks again
Tony