Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi guys,
I have a circular dependency that I can not detecte
If I understood well the definition. A circular dependency is when a measure/column A uses another B to compute and B need A to have a result.
Here is my code
High Risk =
//for each URL, if the number of High Flaws is not equal to the number of High Flaws corrected, the risk of the URL is High
IF(
(CALCULATE(COUNTROWS(SAFE_FINDING))) =
(CALCULATE(COUNTROWS(SAFE_FINDING),SAFE_FINDING[STATUS]="closed"))
,0,1
)
Risk Site Level =
IF(
vWebSites[% Remediation]=1,"Not At Risk",
IF(vWebSites[Critical Risk]=1,"Critical",
IF(vWebSites[High Risk]=1,"High",
"Not At Risk")
)
)
High Risk doesn't depend on Risk Site Level so I don't understand why do I have this problem
A strange thing is this way of calcul worked until I change the tab A to SAFE_FINDING in the formulas.
The Tab A is directly linked to vWebsite and there is 2 tabs between vWebsite and SAFE_FIDING
Thank you guys !
Solved! Go to Solution.
Hi @Anonymous ,
look at this.
"Nevertheless, by using CALCULATE, we are asking to transform the current row context into a filter context and this modifies the dependency list."
https://www.sqlbi.com/articles/understanding-circular-dependencies/
"Risk Site Level" is therefore part of the filter context of "High Risk".
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
hi @Anonymous
If you still have the problem, please share your sample pbix file, we will show you the right formula.
Regards,
Lin
Hi @Anonymous ,
look at this.
"Nevertheless, by using CALCULATE, we are asking to transform the current row context into a filter context and this modifies the dependency list."
https://www.sqlbi.com/articles/understanding-circular-dependencies/
"Risk Site Level" is therefore part of the filter context of "High Risk".
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
thank you for the article that I read and appreciated a lot. I understood where is the problem
But I don't know why the measures had been working until I changed the table of the calcul of the measures(High Risk).
The way of computation and the depency remains the same.
To reduce the list of depency , I tried to use ALLEXCEPT as adviced in the article:
High Risk =
IF(
CALCULATE(COUNTROWS('SAFE_FINDING'),ALLEXCEPT(vWebSites,vWebSites[name])) =
CALCULATE(COUNTROWS('SAFE_FINDING'),LOWER('SAFE_FINDING'[STATUS])="closed",ALLEXCEPT(vWebSites,vWebSites[name]))
,0,1
)
I reduced the list of depency to only 1 which is the 'vWebSites'[name] thus the measure 'Risk Site Level' is not anymore part of filter context of High Risk. But nothing change 😞 Have I done something wrong ?
@v-lili6-msft Hello, thank you for the answer. I'm not able to send you the PIBX which must be privated
hi @Anonymous
If possible, could you please use some dummy data to create a sample pbix file for us have a test, that will be a great help.
Regards,
Lin
My data model is still changing so I should adapt my works to it. Currently, I changed my way of computation and it's working.
Thank you very much for your time !
Have a nice weekend !
Hi @Anonymous,
Please mark a post as solution, this will also help others.
Please give Kudos for support.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi @Anonymous,
can you share a screenshot of the Model view?
I have not yet been able to successfully deal with this topic.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 63 | |
| 55 | |
| 42 | |
| 41 | |
| 23 |
| User | Count |
|---|---|
| 167 | |
| 135 | |
| 120 | |
| 79 | |
| 53 |