Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

MonthSeqNum display 9598 wrong , how to make it display 2239 ?

Hi All

Below expression for create MonthSeqNum work fine :-

AutoNumber(num(year(TempDate)) & num(month(TempDate), '00')) as MonthSeqNum,

Below expression also work fine but return 9598 :-

sum({$<           year=,          month=,           MonthSeqNum = {"$(=only(MonthSeqNum-0))"} >}  Amount/$(Columndim89)/1000)

May i know how to make it display 2239 ?

Paul

2 Replies
paulyeo11
Valued Contributor II

Re: MonthSeqNum display 9598 wrong , how to make it display 2239 ?

my QV file

Re: MonthSeqNum display 9598 wrong , how to make it display 2239 ?

Do you have just one auto number field or are you using auto number more than once?

If you use auto number on more than one field, each instance should have its own Auto ID parameter.

AutoNumber(num(year(TempDate)) & num(month(TempDate), '00'), 'MonthSeq') as MonthSeqNum,



Also the sequence created by auto number does not persist between reloads.

See this blog for more details. QlikView Addict: QlikView Functions: autonumber()

Community Browser