Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

laurent_ankri
New Contributor

Select a date whose between 2 variables

Hi

I have the column DATE_SALAIRE that contains few dates in format dd/mm/yyyy

I have created 2 date variables, that the user have to indicate :

vDateSelectDebut

vDateSelectFin

I want to do the sum of the column MARGE_HT_FACTURATION where DATE_SALAIRE<=vDateSelectDebut and DATE_SALAIRE>=vDateSelectFin

I have tested

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)', DATE_SALAIRE={'<=$(vDateSelectFin)' }} MARGE_HT_FACTURATION)

but it doesn't return me the both conditions together but if just one of them is checked

For example, if

vDateSelectDebut = 01/01/2012

vDateSelectFin = 30/06/2012

I want to select the lines where DATE_SALAIRE between 01/01/2012 and 30/06/2012

Help please

Thanks

Laurent

1 Solution

Accepted Solutions

Re: Select a date whose between 2 variables

HI

     Try like this,

    

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)<=$(vDateSelectFin)' }>} MARGE_HT_FACTURATION)

Both variables are in same format..

Hope it helps

1 Reply

Re: Select a date whose between 2 variables

HI

     Try like this,

    

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)<=$(vDateSelectFin)' }>} MARGE_HT_FACTURATION)

Both variables are in same format..

Hope it helps

Community Browser