Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Defaulting Qlik View

Hello,

My requirement is to default current Quarter based on systems date.

I have a table which will give me the quarter name for every year and month. I loaded the complete data from table in the script and trying to default current quarter using Document open triggers.

my data in table is like this:

FISCAL_DATE   |    FISCAL_YEAR|FISCAL_QUARTER_NAME|FISCAL_MONTH

01-Jan-2013          2013                    Q1                                        01

02-Jan-2013          2013                    Q1                                        01

...

...

..

31-Jan-2013     2013          Q1               01

01-Feb-2103     2013          Q1               02

..

..

31-Dec-2013     2013          Q4               12

and this is how my expression is:

=if(FISCAL_YEAR=Year(Today()) and FISCAL_MONTH=Num(Month(Today())),FISCAL_QUARTER_NAME,Null())

this is not defaulting my current quarter and couldn't figure out why.

Do we need to use set analysis for this?

Thanks

Ramakanth

2 Replies
MayilVahanan

HI

Try like this

In Document properties -> OnOpen

Action -> Select in Field

Field

FISCAL_QUARTER_NAME

Search String

='Q'&Ceil(Month(Today())/3)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi,

Thanks for the response,this works when fiscal year is matching with calendar year.

For example: my fiscal year may start from Apr-March where Apr-Jun is Q1, Jul-Sep is Q2, Oct-Dec is Q3 and Jan-Mar is Q4.

I should be able to handle both cases, so we have a table which will tell us the Quarter based on the Fiscal year and month. So I would prefer to query the table to know my quarter rather than calculating from Today() date function.

Ramakanth