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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trigger Actions for Two Fields

Hi All,

My requirement is by default the year  = current year and period =  current period.

I have created two trigger actions.One for Year and the other one for Period.

Year is working but not period.Can anyone help me on this.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

=only({<PeriodID={"$(=max(PeriodID))"}>} [Calendar Period])

View solution in original post

13 Replies
Not applicable
Author

Hi,

Do you have possibility to upload a sample?

agilos_mla
Partner - Creator III
Partner - Creator III

Please attached a sample.

The issue is probably due to a date format, do you use select in Field Period, max(Period)?

Anonymous
Not applicable
Author

Would making a single concatenated field of Year & Period help ?

Anonymous
Not applicable
Author

What is "period" and how the action looks like?

Clever_Anjos
Employee
Employee

Is your period field related to year?

If so, be carefull about your expression on second action

Not applicable
Author

Hi All,

Here is the attached sample file.Thanks in advance.

Clever_Anjos
Employee
Employee

Try =MAXSTRING([Calendar Period])

Not applicable
Author

MAXSTRING([Calendar Period]) is not working.

agilos_mla
Partner - Creator III
Partner - Creator III

Cast you Calendar Period in a dual :

Dual(

     IF (FISCAL_PERIOD = 1,'P1',

     IF (FISCAL_PERIOD=2,'P2',

     IF (FISCAL_PERIOD = 3, 'P3',

     IF (FISCAL_PERIOD = 4,'P4',

     IF (FISCAL_PERIOD = 5,'P5',

     IF (FISCAL_PERIOD = 6,'P6',

     IF (FISCAL_PERIOD = 7,'P7',

     IF (FISCAL_PERIOD = 8,'P8',

     IF (FISCAL_PERIOD = 9,'P9',

     IF (FISCAL_PERIOD = 10,'P10',

     IF (FISCAL_PERIOD = 11,'P11',

     IF (FISCAL_PERIOD = 12,'P12',

     IF (FISCAL_PERIOD = 13, 'P13'))))))))))))), ((FISCAL_YEAR-1)*13) +FISCAL_PERIOD)  AS 'Calendar Period'

then using Max([Calendar Period]) in a select in Field action should do the trick.