Forum Discussion
REFERÊNCIA CIRCULAR
- 1 year ago
The standard way to avoid circular references in DAX is to push the calculation down into Power Query.
But you can also consider changing your whole approach. "Ending Balance" is just another word for "Running Total". Rework your formulas (or use quick measures) to calculate the RT instead.
- 1 year ago
You can use a combination of variables and iterative functions.
You need to calculate the previous balance for each row, filtered by the same matricula.
Saldo Anterior = VAR CurrentMatricula = 'Equacionamento_Query'[Matrícula] VAR CurrentOcorrencia = 'Equacionamento_Query'[Ocorrência] RETURN CALCULATE( MAX('Equacionamento_Query'[Saldo Final]), FILTER( 'Equacionamento_Query', 'Equacionamento_Query'[Matrícula] = CurrentMatricula && 'Equacionamento_Query'[Ocorrência] = CurrentOcorrencia - 1 ) )and another calculated column for the final balance using the previous balance and the current values :
Saldo Final = VAR Atualizacao = 'Equacionamento_Query'[AtualizaçãoCota.Cota] VAR Valor = 'Equacionamento_Query'[VL EQ. PARTIC] VAR SaldoAnterior = 'Equacionamento_Query'[Saldo Anterior] RETURN IF( ISBLANK(SaldoAnterior), Valor, SaldoAnterior * Atualizacao + Valor )
Hi belaalva,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and regards