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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replace number in field with new value

hi i have a field whereby i would like to replace the number with another number, this number should always be the maximum posting period ie. 11 for the current year.

As you see in the example i have the period 10 and 1, is it possible to replace these values with 11?

Best

Brad

4 Replies
Not applicable
Author

In the script, Just create the temp table that holds maximum value.

Temp:

LOAD Max([Posting Period]) as MaxPP Resident TableName;

Let vMaxPP = Peek('MaxPP') ;

LOAD *, $(vMaxPP) as [New Posting Period] resident TableName;

If you need to create the maximum for each month, create mapping table with Year and Max Posting Period and then replace existing field by using ApplyMap function

Not applicable
Author

Hi,

Thank you in the case of resident name do you mean the table that holds my resident values?

Not applicable
Author

yes

Anonymous
Not applicable
Author

You can also use expression

max({1} [Posting Period])