Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mario_ti
Creator
Creator

Soma com Set Analysis

Pessoal

Tenho esta soma

Sum({$<   DATA_ESTOQUE={'$(=max(DATA_GERAL))'},

                   DATA_VENDA={'>=$(=Date(max(DATA_GERAL)-30,"DD/MM/YYYY"))'}

         >} VL_VDA)

O max(data_geral) é 17/10/2017 ...

Como eu poderia fazer este set analysis?? Pois quando eu seto max(data_geral) ... já digo q os dados são do dia 17/10/2017, porem os dados de venda preciso que seja dos ultimos 30 dias ...

Alguém teria uma ideia??

Labels (5)
1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Can you compute Max(DATA_GERAL) in the script?


In this case you can seta a variable with Max(DATA_GERAL)-30 and use it in the formula

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Can you compute Max(DATA_GERAL) in the script?


In this case you can seta a variable with Max(DATA_GERAL)-30 and use it in the formula

marcelvinicius
Creator III
Creator III

Sum({$<   DATA_ESTOQUE={'$(=max(DATA_GERAL))'},

                   DATA_VENDA={'>=$(=Date(MonthStart(DATA_GERAL)-30,"DD/MM/YYYY"))'}

         >} VL_VDA)

marcelvinicius
Creator III
Creator III

Bom dia ,

Segue uma ideia

Sum({$<   DATA_ESTOQUE={'$(=max(DATA_GERAL))'},

                   DATA_VENDA={'>=$(=Date(MonthStart(DATA_GERAL)-30,"DD/MM/YYYY"))'}

         >} VL_VDA)

mario_ti
Creator
Creator
Author

is what I'm thinking of doing, because I think the problem is in searching dates in different tables ... hence the stock would include the last sale column ... thks

mario_ti
Creator
Creator
Author

Marcel, não deu certo ... mas acho que sei o motivo .. esta se perdendo pois são tabelas diferentes .. acho que é bronca de modelagem ... vou fazer como o alexandros17‌ sugeriu!