4 Replies Latest reply: May 31, 2017 8:24 AM by Casey McDonald RSS

    Setting variables for fiscal year

    Casey McDonald

      Hello! New to Qlik and scripting here, so bear with me!


      Currently I have a few charts that have been hard coded to show certain data regardless of filters. I would like to edit the expressions so the values are variables so I won't have to update each year. An example of one expression is:


      rangesum(above(Sum({1<STATUS_GROUP={'Closed'}, [V_QLIK_OPS_WORKTEAMS.WORK_TEAM_DEPT]={'MAINTENANCE'}, CFYear={'2016/2017'}>}COSTPO),0,12))


      I currently followed the steps mentioned Here when it came to creating Master Calendars for each of my date fields, and ensuring they show the correct Fiscal Year (July 1 through June 30).


      My question, which may be very simple, is how to create a variable for current Fiscal Year? I was able to create variables like the current calendar year "=Year(today())" and Previous Month "MonthName(Today(),-1), but how would I get it to configure so that I can create one that starts in July?