简体   繁体   English

我们如何在 Power BI 中使用趋势 Function,并将 DAX 的常量设置为 False(0)

[英]How Can we use Trend Function in Power BI with Constant set to False(0) with DAX

I have an excel sheet that uses the TREND function to calculate the value of Y. For Some Reason, I am not able to set the constant in my DAX to 0. I have re-used the code Simple linear regression in DAX but I can only get the result based on constant SET to true.我有一个 excel 表,它使用趋势 function 来计算 Y 的值。由于某种原因,我无法将 DAX 中的常数设置为 0。我在 DAX 中重新使用了代码简单线性回归,但我可以只得到基于常量 SET 为真的结果。

I have attached two different Images to compare the changes.我附上了两张不同的图片来比较变化。

Thanks谢谢

When Constant Set To 1 Note: the changes in a Circle当常数设置为 1 注意:圆圈中的变化

When Constant Set To 0 Note: the changes in a Circle当常量设置为 0 注意:圆的变化

With reference to the article you linked, Slope would be redefined as:参考您链接的文章,坡度将被重新定义为:

= Sum_XY / Sum_X2

and Intercept redefined as 0.并且截距重新定义为 0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM