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.
My issue regards a circular dependency I am not able to understand. Here's my relationship pattern:
In table Margine I built 2 calculated columns which I copy down here:
CNTMRG_AvailableCredits = RELATED(Contratti[CNT_Credits]) + CALCULATE(SUM('Extra crediti'[EXTCRD_Credits]) ;
FILTER('Extra crediti' ; Margine[CNTMRG_ContractId] = 'Extra crediti'[EXTCRD_ContractId] && YEAR('Extra crediti'[EXTCRD_Date]) < Margine[CNTMRG_Year] || (YEAR('Extra crediti'[EXTCRD_Date]) = Margine[CNTMRG_Year] && MONTH('Extra crediti'[EXTCRD_Date]) <= Margine[CNTMRG_Month]))) - CALCULATE(SUM(Tickets[TKT_UsedCredits]) ;
FILTER(Tickets ; Tickets[TKT_ContractId] = Margine[CNTMRG_ContractId] && (Tickets[TKT_InsertYear] < Margine[CNTMRG_Year] || (Tickets[TKT_InsertYear] = Margine[CNTMRG_Year] && Tickets[TKT_InsertMonth] <= Margine[CNTMRG_Month])) && Tickets[TKT_Type]="SRQ" && (Tickets[TKT_Solution] = "Resolved" || Tickets[TKT_Solution] = "None" || (Tickets[TKT_Solution] = "WontFix" && DISTINCTCOUNT('Attività'[ACT_Id])<>0))))
CNTMRG_Margin = Margine[CNTMRG_ContractFee] * IF(Margine[CNTMRG_Year] < YEAR(TODAY()) || (Margine[CNTMRG_Year] = YEAR(TODAY()) && Margine[CNTMRG_Month] <= MONTH(TODAY()));1;0) + CALCULATE(SUM('Extra crediti'[EXTCRD_Price]) ;
FILTER('Extra crediti' ; YEAR('Extra crediti'[EXTCRD_Date]) = Margine[CNTMRG_Year] && MONTH('Extra crediti'[EXTCRD_Date]) = Margine[CNTMRG_Month])) - CALCULATE(SUM(Tickets[TKT_OreTotaliAttività]) * 35 ;
FILTER(Tickets ; Margine[CNTMRG_ContractId] = Tickets[TKT_ContractId] && Tickets[TKT_InsertYear] = Margine[CNTMRG_Year] && Tickets[TKT_InsertMonth] = Margine[CNTMRG_Month] && Tickets[TKT_Type] = "SRQ" && (Tickets[TKT_Solution] = "Resolved" || Tickets[TKT_Solution] = "None" || (Tickets[TKT_Solution] = "WontFix" && DISTINCTCOUNT('Attività'[ACT_Id])<>0))))
@Anonymous,
This happens when you have context transition happens in your calculated column, and your table that contains the calculated column does not have a primary key. You can look at this article to have a better understanding of circular dependency.
@Anonymous,
Since you have context transition (using CALCULATE) in the two calculated columns of the many side of the relationship, calculated column 1 depends on all the columns in the Margin table + calculated column 2. Same thing happens to calculated column, where it depends on all the columns in the Margin + calculated column 1. This leads to circular dependency that explains in the article.
@Anonymous
Thanks for answering. Unfortunately I already read it, I understand what circular dependency means, but I don't find out why it affects my situation. I am not able to detect where it takes me.
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 |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |