Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi all
I am getting a circular dependency error, which I have no clue how to fix because no major detail is given.
I will share the 3 dax I use:
1)
Production hours (bottler demand) =
SUMX (
SUMMARIZE (
'SKU by line - Official',
'Hours by line - Official'[Manufacturing plant],
'Hours by line - Official'[Manufacturing line],
'SKU by line - Official'[Merged Product],
"Production", SUM ('SKU by line - Official'[Demand by bottler]),
"UC per hour", [BPM Conversion Real]),
DIVIDE(
[Production],
[UC per hour])
)
2)
Mix by Line Bottler (Hours) =
DIVIDE(
CALCULATE(
SUMX(
'SKU by line - Official',
'SKU by line - Official'[Production hours (bottler demand)]
)
)
,
CALCULATE(
SUMX(
'SKU by line - Official',
'SKU by line - Official'[Production hours (bottler demand)]),
ALLEXCEPT(
'SKU by line - Official',
'SKU by line - Official'[Manufacturing plant of production],
'SKU by line - Official'[Manufacturing line],
'SKU by line - Official'[Date]
)
)
)
3)
3 - Capacity Bottler (Mix with Hours) =
Var mix =
CALCULATE(
'SKU by line - Official'[Mix by Line Bottler (Hours)],
REMOVEFILTERS(
'SKU by line - Official'[Capacity Bottler],
'SKU by line - Official'[Calculated Column Capacity NSR (Mix UC)],
'SKU by line - Official'[2 - Capacity NSR Hours (Mix Hours)])
)
Var result =
mix
* RELATED(
'Hours by line - Official'[Available Production Hours]
)
return result
The error shows as:
Any idea how to fix this?
Thanks.
Hi, @o59393
It is hard to determine what the cyclic dependency error is based on the DAX you provided, it needs to be combined with your data to determine that, you can either share the pbix file without sensitive data or break the chain by rewriting one or more of the metrics. One way is to use variables to store intermediate results and use them in subsequent calculations. Another way is to use the function to create a temporary table containing the results of one metric and then use that table when calculating another metric. Feel free to help you.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @o59393
Of course, I was able to open the file, and after troubleshooting, I can only determine now that it's related to this code below, which may take more time to test.
Best Regards,
Yang
Community Support Team
Hi, could you also share the file with me, or perhaps add a link in the comments for anyone interested to download? I'm keen on helping address the issues.
check theses three measures, it might contain "All" / "values" in the syntax, replace with distinct or allnonblank
can you show us the formula of the three measures, it is hard to tell if they are causing errors.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
99 | |
95 | |
88 | |
70 |
User | Count |
---|---|
165 | |
131 | |
129 | |
102 | |
98 |