Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
CodigoVendedor | Apelido | Movimento_Tipo_Operacao | Date1 | Ano | Mês | Preco_Final | Dt_Passou1 |
2 | CARLOS | VND | 26/03/2018 | 2018 | mar | 100 | 0 |
2 | CARLOS | VND | 28/02/2018 | 2018 | fev | 200 | 0 |
2 | CARLOS | VND | 24/03/2018 | 2018 | fev | 300 | 0 |
22 | ANDRESSA | VND | 26/03/2018 | 2018 | mar | 150 | 0 |
22 | ANDRESSA | VND | 28/02/2018 | 2018 | fev | 250 | 0 |
22 | ANDRESSA | VND | 24/03/2018 | 2018 | mar | 350 | 0 |
2 | CARLOS | VND | 26/03/2017 | 2017 | mar | 110 | 0 |
2 | CARLOS | VND | 28/02/2017 | 2017 | fev | 210 | 0 |
2 | CARLOS | VND | 24/03/2017 | 2017 | fev | 310 | 0 |
22 | ANDRESSA | VND | 26/03/2017 | 2017 | mar | 160 | 0 |
22 | ANDRESSA | VND | 28/02/2017 | 2017 | fev | 260 | 0 |
22 | ANDRESSA | VND | 24/03/2017 | 2017 | mar | 360 | 0 |
Estou com problema, não sei como resolver.
Faço acompanhamento diário das minhas vendas mas por período de
25/02/2018 a 24/03/2018
O problema é que quando chegar no dia 25/03/2018 ele parar de mostrar dados.
Só vai mostrar dados apenas quando virar o mês no dia 01/04/2018. Fico 6 dias sem informações
Como faço para resolver. Abaixo a variavel e o set analysys
Qual seria a solução para eu corrigir isso?
Variável:
vMesAnt =AddMonths(Makedate(year(today()), month(today()),25), -1)
vMesAtual =Makedate(year(today()),month(today()),24)
Set Analysis:
Sum({$<Ano =,Mes=,Date1 = {">=$(=vMesAnt)<=$(=vMesAtual)"},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final)
Thiago no souber explicar.
Ele é fixo vai de 25/02/2017 a 24/03/2017
Mas eu preciso fazer ele proporcional.
Exemplo: Hojé é 07/03/2018
Então teria que fazer até 07/03/2017. Mas com o prazo limite 24/03/2017
Comparar: 25/02/2017 a 24/03/2017
Comparar: 25/02/2018 a 24/03/2018
Proporcional:
25/02/2017 a 07/03/2017 Limite 24/03/2017
25/02/2018 a 24/03/2018 Limite 24/03/2018
Teste da seguinte forma então:
Comparando 25/02/2018 a Data Corrente (limite 24/03/2018)
vMesAnt =If (Day (today ())>24,
Makedate(year(today()), month(today()),25),
AddMonths(Makedate(year(today()), month(today()),25), -1))
vMesAtual = If(Day (today ())>24,
AddMonths(Makedate(year(today()), month(today()),24), 1),
Makedate(year(today()),month(today()),Day(Today())))
Comparando 25/02/2017 a Mesma data da data corrente no ano anterior (limite 24/03/2017)
vMesAnoAnterior_Inicio=If (Day (today ())>24,
AddYears(Makedate(year(today()), month(today()),25),-1),
AddYears(AddMonths(Makedate(year(today()), month(today()),25), -1),-1))
vMesAnoAnterior_Fim = If(Day (today ())>24,
AddYears(AddMonths(Makedate(year(today()), month(today()),24), 1),-1),
AddYears(Makedate(year(today()),month(today()),Day(Today())),-1))
Ufa...
Depois de tantas respostas deve haver alguma(s) que mereça(m) aquela flag marota de "Útil".
Fantástico Mestre Thiago
Sempre às ordens!