Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cont.ses no Qlikview

Preciso contar os telefones que houveram rechamadas no prazo de 7 dias.

Isso significa se ele me ligou hoje 05/07/2016 porem ele já tinha me ligado em dentro do período de 7  dias atrás ( 05/07/2016 – 7), eu considero a ligação de hoje como uma rechamada.

Não consegui fazer esse cont.ses dentro do Qlikview, poderia me ajudar?

Exemplo da base

Data                      Telefone

06/04/2016         111111111

07/04/2016         888888888

08/04/2016         777777777

09/04/2016         99999999

10/04/2016         123456789

15/04/2016         99999999 (Esse telefone é rechamada, pois me ligou no dia 09/07/2016, dentro do prazo de 7 dias atrás)

Preciso do resultado assim:

Data                      Quantidade de ligações                                               Rechamadas

01/07/2016                        33                                                                           2    

02/07/2016                        98                                                                           7

Labels (1)
14 Replies
vinieme12
Champion III
Champion III

Please use below expression

=if(sum({<CallDate=,NumDate = {">=$(vFromDate)<=$(vToday)"} >}CallCount)>1

  ,sum({<CallDate=,NumDate = {">=$(vFromDate)<=$(vToday)"} >}CallCount))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Ainda não consegui

Tem e-mail?

Tel.png

vinieme12
Champion III
Champion III

Hi,

The attached updated QVW shows step by step method of building your expression.

CallBacksEvaluation.JPG

Start with the basic expression:

1st) No of Calls in last 7 days :

          sum({<NumDate={">=$(vFromDate)<=$(vToday)"}>}CallCount)

2nd)No of Callbacks in Last 7 days:  

if(

sum({<NumDate={">=$(vFromDate)<=$(vToday)"}>}CallCount)>1,

sum({<NumDate={">=$(vFromDate)<=$(vToday)"}>}CallCount)

)

Here we only want to check values greater than or equal to 2

, but the expression total is still incorrect and we only want to sum rows which have more than 2 calls.

3rd)Sum of Callbacks:

sum(aggr(

if(

sum({<NumDate={">=$(vFromDate)<=$(vToday)"}>}CallCount)>1,

sum({<NumDate={">=$(vFromDate)<=$(vToday)"}>}CallCount)

),PhoneNo) )

As we only want to sum rows which satisfy our condition we aggregate by our dimension field, the PhoneNo., and the expression totals are also correct.

Also check the listboxes for additional reference

Cheers

V

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

Hi,

I've you've found your solution or found an answer as helpful, please ,mark the same and close this post

Thanks

V

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Marcio_Campestrini
Specialist
Specialist

Gledson

Conseguiu resolver o problema? Se sim, marque a resposta como correta para ajudar a manter a comunidade organizada.

Márcio Rodrigo Campestrini