Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression to trigger current fiscal year as preselection

Hi,

I would like to preselect the current fiscal year on opening the the QVW. I have the same for the current month, so the general approach is clear.

But how can I select the current fiscal year? The data in the corresponding field looks like e.g. '2013/2014' and I'm stuck on building the expression for the trigger.

Thanks.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Generic expression:

=((Year(Today()) + If(Month(Today())>=4, 1, 0) )-1)& '/'& (Year(Today()) + If(Month(Today())>=4, 1, 0) )

Assuming, April is the first month of fiscal year.

View solution in original post

10 Replies
its_anandrjs

Use Document event trigger and apply selection trigger for the current fiscal year field and when you open the application the current selection of fiscal year selection comes.

Hope this helps

Thanks & Regards

Not applicable
Author

Thanks.

I would like to have it dynamically, meaning today is the last day in the FY13/14, tomorrow starts FY14/15, so I would like to preselect the currently valid FY. Is that possible?

alexandros17
Partner - Champion III
Partner - Champion III

Have you tried with this?

If(today() <= makedate(year(today()), 3, 31),

(Year(Today())-1) & '/' & Year(Today()),

Year(Today()) & '/' & (Year(Today())+1)

)

tresesco
MVP
MVP

Generic expression:

=((Year(Today()) + If(Month(Today())>=4, 1, 0) )-1)& '/'& (Year(Today()) + If(Month(Today())>=4, 1, 0) )

Assuming, April is the first month of fiscal year.

Not applicable
Author

I don't know what I'm doing wrong, when using these expressions in a listbox they're working fine, but not as an document event trigger .

tresesco
MVP
MVP

Try to upload a sample qvw that demonstrates the issue.

simondachstr
Luminary Alumni
Luminary Alumni

Try using the =max() function to determine the latest day.

Not applicable
Author

This won't work if I understand you correctly, as we already have future dated FYs in the system.

its_anandrjs

If in your Financial Year field you have a updated max date then in document trigger use On Open -> Add action -> select in field -> select financial year field -> in Search string type =Max(Financial Year).

Hope this helps

Thanks & Regards