Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
Master
Master
Author

my QV file

Colin-Albert

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()