Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a problem.
I'm new on power BI.
What could be the cause of the "A circular dependency was detected" error message?
I have the following DAX expression:
MovingAverage7day =
CALCULATE (
AVERAGEX ( 'abcde', 'abcde'[DAX_diff3(case_a_day)]),
DATESINPERIOD (
'calender'[Date],
LASTDATE ('abcde'[YYYYMMDD]),
-7,
day
)
)
It returns me the following error:
A circular dependency was detected:
abcde[MovingAverage7day],
abcde[7daySUM],
abcde[MovingAverage7day],
7daySUM is the following formula.
7daySUM =
CALCULATE (
SUM ( 'abcde'[DAX_diff3(case_a_day)] ),
DATESINPERIOD (
'calender'[Date],
LASTDATE ('abcde'[YYYYMMDD] ),
-7,
day
)
)
DAX_diff3(case_a_day) is a simple subtraction.
DAX_diff3(case_a_day) = [count_cum] - [maxx_test3]
Somebody can tell me how can I solve this and why this error?
thanks.
@owlet0214 , Try like
7daySUM =
CALCULATE (
SUM ( 'time_series_covid19_confirmed_US3'[DAX_diff3(case_a_day)] ),
DATESINPERIOD (
'calender'[Date],
LASTDATE ('calender'[Date] ),
-7,
day
)
)
Thanks!
But I have same error.
I replaced it with "LASTDATE ('calender' [Date]),".
There is a "many-to-one" and "two-way" relationship with the calendar table.
I intentionally changed the syntax of the 7daySUM DAX expression to get a syntax error.
Then, in "MovingAverage7day", I got the error "There is an error in the Column object named'abcde [7daySUM]' referenced by this expression".
The table name has been changed to "abcde".
It is not described, but does it mean that it refers to 7day SUM?
What could be the reason?
I'm sorry, this is midnight in Japan, so I'll be away from my PC for a while.
thanks,
Dear,
I deleted MovingAverage7day and 7daySUM.
I put MovingAverage7day first and success.
Then I put 7daySUM and had "A circular dependency was detected" error message.
The formula placed first is more successful, and the formula placed later is in an error state.
I'm trying.
Hi , @owlet0214
If it is convenient, can you share a simple example for research?
You can refer to this related documnents.
https://www.sqlbi.com/articles/understanding-circular-dependencies/
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
104 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |