Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make Unique Number?

Hi Experts,

i have a request that i have to get the Unique Numbers from given numbers

Sample Given Table:

IdMonthsNamesVisits
0021JANJack340
9045JANJohn248
4561JANLeslie3

OUTPUT:

IdMonthsHeader 3VisitsUnique Visits
JANJack3401
JANJohn2481
JANLeslie31

So each Month Unique Visits Increments by 1

E.g JAN = 1

     FEB = 1

     MAR = 1

     APR = 1

and so on, so in a year it should be 12 Visits.

16 Replies
petter
Partner - Champion III
Partner - Champion III

AutoNumber is an option

Not applicable
Author

Hi,

How can i Utilize it on an Expression. Straight or Pivot Table?

Please supply an Example.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

How about =count(DISTINCT Names)?

Not applicable
Author

Hi,

Below is my Expression Used:

=sum(aggr(count(DISTINCT SalesDate),CustomerName,SalesDate))

Please Help.

Anonymous
Not applicable
Author

use   in script  autonumberhash256(Id,Months,Year) as uniqueId

If it is for only one year need not consider year but if you need for future many years, you need to consider year also.

at front end table   ---> count(uniqueId)

PrashantSangle

How do you calculate Visits????

sum(aggr(count(DISTINCT SalesDate),CustomerName,Months,Year))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

what unique number you want to show?

Not applicable
Author

Hi,

Below should be output:

idTotal VisitsUnique Visits
0023121
45431
887371
0692441
009781

For each id i must get unique number regardless how many visits i made in a Month

Below is the Expression i use to get total visits made:

=sum(aggr(count(DISTINCT SalesDate),CustomerCodeName,SalesDate))

Peter_Cammaert
Partner - Champion III
Partner - Champion III

So for every Id unique visits is ... 1. Otherwise the Id line would not appear in your table.