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

Histórico de Datas

Hello Pessoal.

Tenho um campo com um histórico de datas.

Quando eu selecionar o ano e/ou mês e/ou semana no qlikview. Preciso que o resultado seja todas as datas <= a minha seleção.

historico_dt.jpg

Labels (3)
14 Replies
Thiago_Justen_

Cristiane,

Talvez ajude adicionar como medida o seguinte (coloque no lugar da coluna Codigo):

Sum({<SEU_CAMPO_DATA={"<=$(=MakeWeekDate(GetFieldSelections(Ano),GetFieldSelections(Semana)))"}>}Codigo)

Repare que você não precisa selecionar o filtro de mês pois a função usada MakeWeekDate usa somente ano e número da semana para criar a data no formato dd/mm/yyyy.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Thiago_Justen_

Caso não funcione, mande me um app de exemplo que resolvo pra você,

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
rogerioalmeida
Creator
Creator

Cristiane,

Olha se esse post ajuda você, é algo parecido.

Vendas do mês anterior

Espero ter ajudado

cristianevpm
Contributor III
Contributor III
Author

Oi Thiago fiz assim mas não está funcionando

=count({<Evoluc_Entrada.DF_DT={"<=$(=MakeWeekDate(GetFieldSelections(Evoluc_Entrada.Ano_Defeito),GetFieldSelections(Evoluc_Entrada.Semana_Defeito)))"}>}

Evoluc_Entrada.ID_Entrada)

cristianevpm
Contributor III
Contributor III
Author

thiago.justen

Contar a qtd de 'chaves' com Data=<  (ao ano e semana selecionada).

Ex,.: Selecionar 2018 e semana 3. O resultado deve ser a qtd de chaves <= ano e semana filtradas.

  

ChaveData
2711105105/09/2017
2775135815/01/2018
2775140015/01/2018
2775142815/01/2018
2762770420/12/2017
2775139115/01/2018
2775142915/01/2018
2744705015/11/2017
2768541003/01/2018
2768541303/01/2018
2752580129/11/2017
2772346708/01/2018
2768306302/01/2018
2772344108/01/2018
2768301502/01/2018
2768301302/01/2018
2772344408/01/2018
2772342908/01/2018
2744706215/11/2017
2769337102/01/2018
2744706515/11/2017
2775142215/01/2018
2772348808/01/2018
2775146015/01/2018
2769338802/01/2018
2748738022/11/2017
2729827518/10/2017
2729827718/10/2017
2775136515/01/2018
2775143515/01/2018
2772343408/01/2018
2775145415/01/2018
2768305302/01/2018
2743706714/11/2017
2772348908/01/2018
2775139215/01/2018
2774458615/01/2018
2775143715/01/2018
2768302102/01/2018
2769421103/01/2018
2758743713/12/2017
2758743913/12/2017
2743397113/11/2017
2775136815/01/2018
2775141715/01/2018
2772346008/01/2018
2768304902/01/2018
2782243918/01/2018
2768304102/01/2018
2772348608/01/2018
2768015028/12/2017
2768005828/12/2017
2768014428/12/2017
2762249815/12/2017
2766475327/12/2017
2762081418/12/2017
2772345708/01/2018
2776167617/01/2018
2775461216/01/2018
2755202505/12/2017
2782244018/01/2018
2778924119/01/2018
2776167717/01/2018
2762066119/12/2017
2773305609/01/2018
2766449127/12/2017
2768012428/12/2017
2768013028/12/2017
2768003828/12/2017
2768009428/12/2017
2768016128/12/2017
2782244118/01/2018
2771677609/01/2018
2768003328/12/2017
2755201405/12/2017
2762259719/12/2017
2763006020/12/2017
2775479316/01/2018
2763005920/12/2017
2772532710/01/2018
2768009028/12/2017
2768012328/12/2017
2768004028/12/2017
2768003128/12/2017
2762704920/12/2017
2747713620/11/2017
2764109322/12/2017
2772546410/01/2018
2720291426/09/2017
2768009728/12/2017
2744615414/11/2017
2762381619/12/2017
2763825420/12/2017
2776112916/01/2018
2776108116/01/2018
2776114316/01/2018
2762705120/12/2017
2772547210/01/2018
2776109116/01/2018
2776112416/01/2018
2776289617/01/2018
2776113216/01/2018
2768008628/12/2017
2762382219/12/2017
2768013128/12/2017
2762705320/12/2017
2762705420/12/2017
2772562910/01/2018
2772648810/01/2018
2757876211/12/2017
2767955329/12/2017
2777385818/01/2018
2767960329/12/2017
2775950615/01/2018
2775949715/01/2018
2768763128/12/2017
2772107509/01/2018
2767958829/12/2017
2762371519/12/2017
2767956829/12/2017
2776157616/01/2018
2762588619/12/2017
2767960229/12/2017
2764646222/12/2017
2767958729/12/2017
2776157316/01/2018
2762373019/12/2017
2776160316/01/2018
2767962229/12/2017
2776162316/01/2018
2776162016/01/2018
2768761728/12/2017
2772110609/01/2018
2768762528/12/2017
2768766228/12/2017
2719946625/09/2017
2776158316/01/2018
2767956529/12/2017
2767955829/12/2017
2776162216/01/2018
2776157016/01/2018
2762377719/12/2017
2776159316/01/2018
2772109309/01/2018
2772108009/01/2018
2776156816/01/2018
2769327303/01/2018
2762411419/12/2017
2763510821/12/2017
2776629317/01/2018
2776282515/01/2018
2772163305/01/2018
2752462429/11/2017
2772165205/01/2018
2776282315/01/2018
2772169405/01/2018
2776629617/01/2018
2772170705/01/2018
2772166305/01/2018
2772167705/01/2018
2772169605/01/2018
2772118710/01/2018
2778194719/01/2018
2772162905/01/2018
2755504506/12/2017
2778194219/01/2018
2768758228/12/2017
2772122010/01/2018
2775950715/01/2018
2763549421/12/2017
2772128310/01/2018
2772134410/01/2018
2768764728/12/2017
2768765628/12/2017
2768764428/12/2017
2772190210/01/2018
2763561621/12/2017
2763561721/12/2017
2766395227/12/2017
thiago.justen
Thiago_Justen_

Um minuto e já volto com a solução.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Thiago_Justen_

Veja se te atende assim Cristiane:

Capturar.PNG

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
cristianevpm
Contributor III
Contributor III
Author

Show thiago.justen

Pode me passar pra testar?

Abç.

Obrg!!!

Thiago_Justen_

Usei essa expressão:

Avg({1<Data_Base={"<$(=MakeWeekDate(GetFieldSelections(Ano),GetFieldSelections(NrSemana)))"}>}DISTINCT Chave)

Ela vai causar um problema quando houver mais de uma chave na data...vou trabalhar numa solução melhor.

Teste a fórmula em seu dash e veja se te atende por ora.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago