Forum Discussion
Circular dependency was detected
Hello,
Would someone help me please.
I am trying to get the rating of each staff per KPI based on thier current score.
I have my "Monthly Score" table
| name | ATT_% | AHT_ | FCR_% | NPS_ | QA_% |
| Staff 1 | 100.00% | 785.45 | 50.00% | 33.3333 | 54.67% |
| Staff 2 | 87.50% | 1529.05 | 33.33% | 33.3333 | 0.00% |
| Staff 3 | 93.75% | 749.32 | 100.00% | 100 | 76.50% |
| Staff 4 | 98.08% | 628.50 | 60.00% | 60 | 0.00% |
| Staff 5 | 100.00% | 1166.59 | 100.00% | 0 | 0.00% |
I also have this "Target" table that consist of the Rating based on the score Range. It also consist of Department and Month that need to be consider also.
I used the below calculated column to get the ATT Rating and it seems run accurately.
Here is the result, which I think captures the correct rating.
My problem is when I'm going to get the other KPIs rating, using the same pattern of calculated column, I got an error.
Anonymous
You can't have two or more calculated columns using CALCULATE unless you have a unique ID column in the table.
Add an ALLEXCEPT to your CALCULATE filters with the UniqueID column of the table, this will stop the columns from referencing each other when they try to convert the row context into equivalent filter context.
ATT Rating_ =IF([ATT_%]=1,5,CALCULATE(FIRSTNONBLANK(Target[Rating],1),FILTER(Target,Target[Deparment] = 'Monthly Score'[Department]&& [ATT_%]>Target[ATT Min]&& [ATT_%]<Target[ATT Max]&& 'Monthly Score'[Month_]=Target[Month]),ALLEXCEPT( Tablethiscolumnisin[UniqueIDofthatTable] )))Alternatively you could create measures instead of calculated columns.
1 Reply
- AllisonKennedyCommunity Champion
Anonymous
You can't have two or more calculated columns using CALCULATE unless you have a unique ID column in the table.
Add an ALLEXCEPT to your CALCULATE filters with the UniqueID column of the table, this will stop the columns from referencing each other when they try to convert the row context into equivalent filter context.
ATT Rating_ =IF([ATT_%]=1,5,CALCULATE(FIRSTNONBLANK(Target[Rating],1),FILTER(Target,Target[Deparment] = 'Monthly Score'[Department]&& [ATT_%]>Target[ATT Min]&& [ATT_%]<Target[ATT Max]&& 'Monthly Score'[Month_]=Target[Month]),ALLEXCEPT( Tablethiscolumnisin[UniqueIDofthatTable] )))Alternatively you could create measures instead of calculated columns.