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...
Anonymous
8 years agoNot applicable
Really excellent stuff !!
I had managed to do a linear regression line previously but this is so much cleaner
I did have to tweak yours slightly
1) Instead of a plain old Allselected i needed to
do
CALCULATETABLE (
SUMMARIZE (
FeederHistory,
FeederHistory[EventDateHour],
FeederHistory[EventDate]
),
ALLSELECTED ( FeederHistory )
),
and for some reason SSRS moaned at me for using SELCTEDVALUE so I replaced it with the older hasonevalue values paradigm
ie
RETURN
Intercept
+ Slope
* IF (
HASONEVALUE ( FeederHistory[EventDate] ),
VALUES ( FeederHistory[EventDate] ))
Anonymous
8 years agoNot applicable
I know this is a Power Bi portal but I had to make it work for both PBI and SSRS