Forum Discussion
Yaa_D
4 years agoFrequent Visitor
'Working on it' hangs when combining multiple calculation into one column
Hi All, I have a specific calculation that works OK when seperated to different columns, but hangs when trying to combine it all into one column. The specifics: I have a table that gets update...
Yaa_D
4 years agoFrequent Visitor
Thank you for the reply! I really have a lot to learn in Power BI, most of the time I'm just using the tools I already know that do the job.
When trying the solution you offered I get the error "A circular dependency was detected" on Total diff column, do you have any thoughts on why this is happening?
Thanks again!
johnt75
Super User
4 years agoits possible that the column itself is being included in the TOPN calculations, try replacing that line with
var prevTotal = SELECTCOLUMNS( TOPN(1, SELECTCOLUMNS(
FILTER( ALLEXCEPT( 'table1', 'table1'[id]),
'table1'[fileDate] <= currentDate - 28 ),
"@fileDate", 'table1[fileDate], "@value", 'table1[total])
@fileDate, DESC), "@val", [@value])