Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amit_saini
Honored Contributor III

Logic help for calculation =count(Date) in list box

Hi Folks,

Not sure if this is possible.

I'm having simple script like below:

LOAD User,

     Date,

     month(Date) as Month,

 

     year(Date) as Year

FROM

....

I have created below table in front end:

Is there any possibility that I can call count(Month) in a list box to get these numbers as a list????

Thanks,

AS

1 Solution

Accepted Solutions
amit_saini
Honored Contributor III

Re: Logic help for calculation =count(Date) in list box

I think I got it. This is working

=Aggr(Count(Month), User)

Thanks,

AS

10 Replies

Re: Logic help for calculation =count(Date) in list box

Try this:

=Aggr(Count(Month), Firstname, LastName)

Re: Logic help for calculation =count(Date) in list box

Hi

May be try like this,

Add expression in the listbox

First Name

Exp: = Count(Month)

Or

Add like

=Aggr(Count(Month), [First Name])

amit_saini
Honored Contributor III

Re: Logic help for calculation =count(Date) in list box

Sorry Sunny , it's showing me '-'

I have tried something like below:

=aggr(count( Date),Lastname)

and this is working , but i believe this is count of Date not Month

Thanks,
AS

balrajahlawat
Esteemed Contributor

Re: Logic help for calculation =count(Date) in list box

Yeah, you can......

Just use aggr() function in listbox expression intead of field....

Something like suggested by Sunny T

amit_saini
Honored Contributor III

Re: Logic help for calculation =count(Date) in list box

I have already tried this , not working.

PFA

Thanks,
AS

balrajahlawat
Esteemed Contributor

Re: Logic help for calculation =count(Date) in list box

check this?

amit_saini
Honored Contributor III

Re: Logic help for calculation =count(Date) in list box

Balraj,

Actually I'm facing issue below:

Some cases it is working fine like below

and

in some cases not like below:

Re: Logic help for calculation =count(Date) in list box

Hi'

Try like this

=(Aggr(Count(Month),  User))

amit_saini
Honored Contributor III

Re: Logic help for calculation =count(Date) in list box

I think I got it. This is working

=Aggr(Count(Month), User)

Thanks,

AS

Community Browser