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

how to extract data for only current data fiscal year

Hello All,

         i need to extra only current fiscal year data, what i mean is ,i got a field called FISCYEAR (which was in string i converted it in to numeric by using Num# function Num#(FISCYEAR) as FISCYEAR )) from source,which has values like

FISCYEAR 

2018

2017

2016

now i need to write a conditon while extracting such that if (FISCYEAR  = todays  fiscal year then extract else show null values)

for example if i do a  reload on 31/03/2018 then i need to get FISCYEAR=2018 data ony  and then

            if i reload on 01/04/2018 then i need to get FISCYEAR=2019 data only ,if  data is present   then extract data else show null values

i tried this  where FISCYEAR=year(date(today()));

but it is throwing error

Any suggestion plz

2 Replies
tresesco
MVP
MVP

try like:

Where FISCYEAR=year(AddMonths(today(),4));

snehamahaveer
Creator
Creator

Hi Naveen,

I would suggest you create a variable that calculates current fiscal year based on today's date (as below).

if (Month(Today()) >4, Year(Today())+1, Year(Today()));

Then use this variable in your load statement's where clause.

Good luck,

Sneha