Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
'Cumulative Amount' and 'Shared Amount' are calculated column that
Cumulative Amount = VAR FTBO = FILTER(Table,Table[Name]=EARLIER(Table[Name]) VAR FTBT = FILTER(Table,Table[Name]=EARLIER(Table[Name]) return |
Shared Amount= if ([Cumulative Amount]>[Retention],[Share%]*[Amount],0) |
What I actually want is to also take out the cumulative 'Shared Amount' from 'Cumulative Amount' so that
G4 = 3,000,000 - 750,000 = 2,250,000; H4 = 2,250,000*0.5 = 1,125,000
and G5 = 7,909,130 - 1,125,000 - 750,000 = 6,034,130; H5 = 6,034,130* 0.5 = 3,017,065
So I edited the last line of Cumulative Amount formula to
return SUMX(FTBT,[Amount])+SUMX(FTBO,[Amount])+[Amount]-SUMX(FTBT,[Shared Amount])-SUMX(FTBO,[Shared Amount]) |
But it will hit the circular dependency error. I understand how it hit the circular dependency error if I am only looking at the same line but the table has already been filtered to exclude the current row so there should not be any circular reference.
Is it possible to be solved?
Thank you very much in advance for your help.
Hi, @KMLAI
You can try the following methods.
Previous Shared Amount =
Var _N1=MAXX(FILTER('Table',[Name]=EARLIER('Table'[Name])&&[ISSUE_DATE]<EARLIER('Table'[ISSUE_DATE])),[Shared Amount])
Var _N2=MAXX(FILTER('Table',[Name]=EARLIER('Table'[Name])&&[ISSUE_DATE]=EARLIER('Table'[ISSUE_DATE])&&[Index by Issue Date]<EARLIER('Table'[Index by Issue Date])),[Shared Amount])
Return
_N1+_N2Cumulative Amount2 = [Cumulative Amount]-[Previous Shared Amount]Shared Amount2 = IF([Cumulative Amount2]>[Retention],[Share%]*[Cumulative Amount2],0 )
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-zhangti.
the row 3 is same as expected but the row 4 is not as the [Cumulative Amount2] is referring to the [Shared Amount] instead of [Shared Amount2]. (i.e. It should be 7,909,130 - 1,125,000 - 750,000 = 6,034,130 while now we have 7909130 - 1500000 = 6409130)
By adding column means if I have 20 rows then I will 19*2 more columns.
Is there a simplifying way to do that?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |