Simple Linear Regression
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
tonymaclaren, it is likely that at the grand total level what you see is not a total, but the Intercept. This is because the following expression evaluates to Intercept:
Intercept + Slope * SELECTEDVALUE ( 'cetdata'[YEAR] )
At the grant total level, there is usually more than one 'cetdata'[YEAR], hence SELECTEDVALUE ( 'cetdata'[YEAR] ) returns BLANK, turning the multiplication into BLANK as well, leaving only Intercept.
I updated my blog post to deal with this kind of situations.
Anonymous, glad you found this useful!
- tonymaclaren8 years agoHelper I
Dar Daniil
Thanks for the explanation.The same value also appears at the top of the [Estimated] measure, but only if the whole of the data for ('Ctedata'[YEAR])is displayed. is there a modification to eliminate this?
Tony
- Daniil8 years agoKudo Kingpin
Tony, it's a bit difficult to advise anything without seeing your report -- can you share a sample of your data?
- tonymaclaren8 years agoHelper I
Hi Daniil
Sure, no problem.What would you like me to supply and how.The full dataset is for 391 years.
Tony