Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
leonardosmartins
Contributor II
Contributor II

Comando Store condicional

Tenho o comando para gerar um csv de uma tabela que carreguei:

Store TAB_EXPORTACAO into EXPORTACAO.csv(txt);

Ao mesmo tempo, tenho uma condição para indicar o dia de semana atual ( no caso quero saber se hoje é segunda-feira):

if(Weekday(Today()) = 'seg', 'SIM')

 

Como faço para condicionar a geração do csv (store) somente se o dia da semana for segunda-feira ?

Não consegui "encaixar" o if no store.

2 Solutions

Accepted Solutions
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Olá Leonardo!

 

Segue solução abaixo:

LET vDiaSemana = WeekDay(Today(1));

IF Match('$(vDiaSemana)','seg') THEN
STORE [TABELA] into [Servidor/Indicadores\Transformacao/]arquivo.qvd;
End If;

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

RafaMartins
Creator II
Creator II

Boa tarde, pode ser usado algo assim

if WeekDay(Today()) = 'seg' then
Store Tabela into [lib://Transformados/tabela.qvd] (qvd);
End If;

 

View solution in original post

4 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Olá Leonardo!

 

Segue solução abaixo:

LET vDiaSemana = WeekDay(Today(1));

IF Match('$(vDiaSemana)','seg') THEN
STORE [TABELA] into [Servidor/Indicadores\Transformacao/]arquivo.qvd;
End If;

Help users find answers! Don't forget to mark a solution that worked for you!
RafaMartins
Creator II
Creator II

Boa tarde, pode ser usado algo assim

if WeekDay(Today()) = 'seg' then
Store Tabela into [lib://Transformados/tabela.qvd] (qvd);
End If;

 

leonardosmartins
Contributor II
Contributor II
Author

Obrigado. Funcionou.

joaopaulo_delco
Partner - Creator III
Partner - Creator III

oi Eduardo, marque a resposta como resolvida por favor.

Help users find answers! Don't forget to mark a solution that worked for you!