Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Hi Team ,

I have a requirement that I should get the unique count of login names for a particular month and if it is repeating again in next I should not take it consideration for  unique count for the next month .

For your reference I am attaching the qvw file and output I am getting .

Please find the below desired output

MonthUnique   Distinct Count(Checking with previous months)Unique Count
Jan 201533
Feb 201534
Mar 201515

Thanks in Advance

Sreehari

1 Solution

Accepted Solutions
Highlighted
anbu1984
Honored Contributor III

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

11 Replies
Highlighted
anbu1984
Honored Contributor III

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Check this app

Highlighted
Not applicable

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Hi Anbu Cheliyan,

Thanks for your solution.

Can you confirm that is it is comparing the whether the occurrence  of Name had  happened with all the months before but not the one month before .As per my understanding it is only checking only previous month but not all the previous months.

Thanks

Sreehari

Highlighted
anbu1984
Honored Contributor III

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Only one previous month.

What is your requirement?

Highlighted
Not applicable

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

I have to check all the previous month

Highlighted
anbu1984
Honored Contributor III

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Highlighted
Partner
Partner

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Hi Sreehari,

Write the expression as

=count( If(Count=1,Name))

You'll get the same result which you want.

Thanks and Regards,

Ankita

Highlighted
Not applicable

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Thanks  Anbu Cheliyan and Ankita for your solution..

Let me check with my current  original data will it work prefectly or not ..

Sreehari

Highlighted
Not applicable

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

Hi Anbu Cheliyan,

Can you explain me how the Autonumber for this solution?

Highlighted
anbu1984
Honored Contributor III

Re: get the count of unique for a month also if it is repeating again in next month or occured before in previous month it should not consider

From QV help,

autonumber(expression[ , AutoID])

Returns a unique integer value for each distinct evaluated value of expression encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.

In order to create multiple counter instances if the autonumber function is used on different keys within the script, an optional parameter AutoID can be used for naming each counter.

AutoNumber(RowNo(),Name) -- Each Name is used as counter and RowNo() generates from 1,2..N for each Name based on rows you have in your source