Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello All,
Need help to fix circular dependency in order to get the final date
In calculations, need to average and then find how much time is required for completion based on last 2 months average.
Columns - Status ( there are 2 status - completed and pending) ,project, points, closingdate, work_left
[points] are at [mainkey_id] level and rolled up to project level
work_left is sum of points at [mainkey_id] level with [status] as pending
DateDim is calculatedtable having all dates and joined with closingdate from Query1
based on completed status for last 2 months we add the points per project and take an average.
[AvgWorkDone] =
IF(ISBLANK(CALCULATE(SUM('Query1'[points]),DATESBETWEEN(DateDim[Date],TODAY()-60, TODAY()) , ALLEXCEPT('Query1','Query1'[mainkey_id]))/2 ),0,CALCULATE(SUM('Query1'[points]),DATESBETWEEN(DateDim[Date],TODAY()-60, TODAY()) , ALLEXCEPT('Query1','Query1'[mainkey_id]))/2 )
The report has to show all data so we have data pulled for last 2 years and for computing final date we need to consider only last 2 months average.
This still works fine, but the calculated number of days are to be added in today's date so using DateAdd get circular dependency. Tried using ALLEXCEPT but nothing works..
to calculate the final date ---
CALCULATE
(
DATEADD(
Query1[DateToday],
DIVIDE(
SUM(Query1[work_left]),
CALCULATE(SUM(Query1[AvgWorkDone]),ALLEXCEPT(Query1,Query1[mainkey_id]))
,0)
,DAY)
,ALLEXCEPT(Query1,Query1[[mainkey_id])
not sure what needs to be changed or calculated differently. Any help much appreciated
Solved! Go to Solution.
If possible, push the calculated columns computation further upstream (into Power Query or the data source). That will avoid the circular reference issue.
Same for the DateDim - don't do that in DAX, do it in Power Query or further upstream.
If possible, push the calculated columns computation further upstream (into Power Query or the data source). That will avoid the circular reference issue.
Same for the DateDim - don't do that in DAX, do it in Power Query or further upstream.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |