在 powerbi 中检测到循环依赖
A circular dependency was detected in powerbi
下面是我的table.
GName
Year
Opening Stock
InQty
initemvaluee
Opening Stock Value
Average Value
Average Value previous
Bahria Town
2,016
4,454
126,610,300
-
28,426
Bahria Town
2,017
868
6,379
166,903,972
-
23,031
28,426
我平均使用公式
Average Value =
VAR foropning =
IF (
[Opening Stock] = 0,
( ( [initemvaluee] ) / ( [inqtyy] + [Opening Stock] ) )
)
VAR notforopning =
IF (
[Opening Stock] <> 0,
( ( [initemvaluee] + [Opening Stock Value] ) / ( [inqtyy] + [Opening Stock] ) )
)
RETURN
IF ( [Opening Stock] = 0, foropning, notforopning )
为了打开股票价值我只是简单地做
Opening Stock Value = [Opening Stock] * [Average Value previous]
它给出了错误,请帮助摆脱依赖。
我猜你对 [Average Value previous]
的计算取决于 [Average Value]
,而 [Average Value]
又取决于 [Opening Stock Value]
,后者循环又取决于 [Average Value previous]
。
下面是我的table.
GName | Year | Opening Stock | InQty | initemvaluee | Opening Stock Value | Average Value | Average Value previous |
---|---|---|---|---|---|---|---|
Bahria Town | 2,016 | 4,454 | 126,610,300 | - | 28,426 | ||
Bahria Town | 2,017 | 868 | 6,379 | 166,903,972 | - | 23,031 | 28,426 |
我平均使用公式
Average Value =
VAR foropning =
IF (
[Opening Stock] = 0,
( ( [initemvaluee] ) / ( [inqtyy] + [Opening Stock] ) )
)
VAR notforopning =
IF (
[Opening Stock] <> 0,
( ( [initemvaluee] + [Opening Stock Value] ) / ( [inqtyy] + [Opening Stock] ) )
)
RETURN
IF ( [Opening Stock] = 0, foropning, notforopning )
为了打开股票价值我只是简单地做
Opening Stock Value = [Opening Stock] * [Average Value previous]
它给出了错误,请帮助摆脱依赖。
我猜你对 [Average Value previous]
的计算取决于 [Average Value]
,而 [Average Value]
又取决于 [Opening Stock Value]
,后者循环又取决于 [Average Value previous]
。