Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
Frquiroga1995
Contributor II
Contributor II

Count with conditions

 

Hi !

I loaded a lot of data in the script. After that, I want to visualize some information in the front.

I want to count the amount of "Nro Interno" related to the date "Fecha Recep"

And also, the amount of "Nro Interno" related to the date "Fecha Cambio" with "Descrip" = Aprobado.

Fecha Recep and Fecha Cambio are two different dates, and for different purposes.

The thing is that in the front I want to have just one filter for date in a list box (a general date). And with that filter, be able to have the counts I mentioned before. That date must apply for Fecha Recep and Fecha Cambio.

 

Nro InternoFecha RecepFecha CambioDescrip
1210/01/202110/01/2021Aprobado
4312/09/202010/01/2021Aprobado
3410/07/202025/12/2020Pendiente
5411/06/202010/01/2021Aprobado

 

I hope I made myself understand

 

Thanks in advance !

 

Labels (4)
1 Reply
QFabian
Specialist II
Specialist II

Hi @Frquiroga1995 , please check the example qvw.

It creates a new field, based on your fields :


Fecha:
Load distinct [Fecha Recep] as Fecha Resident Datos;
Load distinct [Fecha Cambio] as Fecha Resident Datos;

 

And then, you can use this expression :

count({< [Fecha Cambio] = p(Fecha), Descrip = {"Aprobado"} >} [Nro Interno])

 

See the attached file, saludos!

QFabian