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.
Bom dia,
Estou fazendo um visual para mostrar o histórico de estoque mês a mês, com isso preciso ter o a quantidade do estoque todo mês, porém tem mês que nem todos os itens do estoque movimentam no sistema porém preciso dessa informação para saber o total.
Preciso preencher o vazio do estoque pelo estoque anterior do item assim como está na foto.
preciso preencher esses valores de "0" com a informação do estoque anterior linha a linha.
Solved! Go to Solution.
Hi @Renan_Barrios ,
Based on your description, I have created a simple sample:
Please try:
Column =
var _a = MAXX(FILTER('Table',[ID]=EARLIER('Table'[ID])&&[Value]<>0&&[YearMonth]<EARLIER('Table'[YearMonth])),[YearMonth])
var _b = CALCULATE(MAX('Table'[Value]),FILTER('Table',[ID]=EARLIER('Table'[ID])&&[YearMonth]=_a))
return IF([Value]=0,_b,[Value])
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ele deu certo quando o item não movimenta por um mês, porém tem itens que não movimentam por mais tempo ai preciso preencher também
Hi @Renan_Barrios ,
Based on your description, I have created a simple sample:
Please try:
Column =
var _a = MAXX(FILTER('Table',[ID]=EARLIER('Table'[ID])&&[Value]<>0&&[YearMonth]<EARLIER('Table'[YearMonth])),[YearMonth])
var _b = CALCULATE(MAX('Table'[Value]),FILTER('Table',[ID]=EARLIER('Table'[ID])&&[YearMonth]=_a))
return IF([Value]=0,_b,[Value])
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Deu certo, a coluna [Filial] era um filtro também então concatenei o part number e a filial para criar um novo ID, desta forma deu certo.
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 |
---|---|
44 | |
26 | |
22 | |
11 | |
8 |
User | Count |
---|---|
75 | |
50 | |
47 | |
17 | |
17 |