Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Medida que Retorne o Saldo Acumulado do dia Anterior

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Desculpe, mas não consegui visualizar e/ou entender o funcionamento.

No meu ver, não funcionou.

 

Poderia tentar me explicar só mais uma vez por favor?

 

Lembrando a título de exemplo que:

O SALDO INICIAL SERÁ SEMPRE O ACUMULADO DO DIA ANTERIOR.

View solution in original post

9 REPLIES 9
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

It works well. Could you please tell what is the error?

Transf.SaldoAcumu = CALCULATE(SUM('BalanceteAnalítico'[Acumulado]),FILTER(ALL('BalanceteAnalítico'),'BalanceteAnalítico'[Data]=SELECTEDVALUE('BalanceteAnalítico'[Data])-1))

vpollymsft_0-1643869773175.png

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Desculpe, mas não consegui visualizar e/ou entender o funcionamento.

No meu ver, não funcionou.

 

Poderia tentar me explicar só mais uma vez por favor?

 

Lembrando a título de exemplo que:

O SALDO INICIAL SERÁ SEMPRE O ACUMULADO DO DIA ANTERIOR.

v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

I have a create a simple sample. Please refer to it to see if it helps you.

Create a measure.

flag = CALCULATE(SUM('Table'[_1D]),FILTER(ALL('Table'),'Table'[date]<=MAX('Table'[date])))

vpollymsft_0-1643595818151.png

If I have misunderstood your meaning, please provide your desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Boa tarde!

Não, não seria isso mas, vamos pegar sua tabela como exemplo porém, fazendo algumas alterações em suas colunas a saber:

A coluna"_1D" chame-a de "Valor".

A coluna "flag" chame-a de "Acumulado".

 

Agora vamos a questão:

Considerando que sua tabela começa em 01/12/2021, qual é o saldo anterior ou seja: 30/11/2021?
De posse tessa informação, precisamos de uma medida que chamaremos de SALDO INICIAL. Essa medida derá mostrar o saldo do dia anterior ou seja, o que sobrou do dia 30/11.

Em outras palavras, o SALDO FINAL de hoje, deverá ser o SALDO INICIAL de amanhã e assim sucessivamente.

 

Consegue me ajudar?

Hi @Anonymous , 

Please have a try.

 

previous_ = CALCULATE(MAX('Table'[_Accumulated]),FILTER(ALL('Table'),'Table'[date]=SELECTEDVALUE('Table'[date])-1))

 

vpollymsft_0-1643679124161.png

 

 

 

If I still misunderstand your meaning, please provide your desired output. For example, What do you want to get 2021/12/1 output what results, 12/1:0 and 12/2:12? Or other?

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Olá...
Agora sim, estamos falando a mesma língua.

Baixei sua planilha e está correto e funcional sua medida porém, na minha, não estou conseguindo.

Está dando erro.

Até consegui criar a coluna que acumula o saldo levando em consideração a categoria porém, não consegui criar a coluna "Transf.SaldoAcumul" que na sua seria a "previous_".

Tentei anexar minha planilha aqui para você, mas não aceitou o tipo de arquivo.

Baseado na sua coluna "previous" ou descrever abaixo a medida que criei para a minha que se chamaria "Transf.SaldoAcumul" e também o erro. Veja:

Transf.SaldoAcumu = CALCULATE(MAX('BalanceteAnalítico'[Acumulado],FILTER(ALL('BalanceteAnalítico','BalanceteAnalítico'[Data]=SELECTEDVALUE('BalanceteAnalítico'[Data]-1)))))


...aí está dizendo que:
Poucos argumentos foram passados para a função FILTER. Contagem mínima de argumentos para a função: 2.

Alguma outra sugestão?

Hi @Anonymous ,

Please change the position of the brackets.

Transf.SaldoAcumu = CALCULATE(MAX('BalanceteAnalítico'[Acumulado]),FILTER(ALL('BalanceteAnalítico'),'BalanceteAnalítico'[Data]=SELECTEDVALUE('BalanceteAnalítico'[Data]-1)))

If it still doesn't work, please provide your pbix without privacy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Bom dia...
Infelizmente nao deu certo novamente.

Anexo link do PBI conforme solicitado.

Desde ja, agradeco imensamente pelo apoio e ajuda.

No aguardo...

 

https://drive.google.com/file/d/1UzXfosckE1hJWR-ZzjkD3SAEzy888vJu/view?usp=sharing 

Anonymous
Not applicable

Olá...

Estou precisando desenvolver uma medida no PowerBI que me retorne o saldo inicial.

 

Lembrando que:

O SALDO INICIAL de 01/01/22 é exatamente o SALDO FINAL de 31/12/21 e assim sucessivamente.

Minhas colunas são:

  • Calendário
  • Categoria (R/D)
  • Valor (Que traz RECEITAS (R) e DESPESAS(D) tudo positivo

 

Alguém poderia me auxiliar por favor?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.