Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
aarav021
Contributor III
Contributor III

Can anyone help me with the correct logic for this code. This seems to be showing incorrect reusult

Hi I am new to Qlik Sense. Can anyone please help me with correctsolution to this as this is an urgent requirement.

LOAD

if(Year(max(FISCAL_YEAR))=Year(Today()), Year(max(FINANCIAL_YEAR))) as Curr_FY, if(Year(max(FISCAL_YEAR))=Year(Today()), Year(today()-1)) as Prev_FY Resident [data_table];

Let Current_FY = '=Curr_FY'; Let Last_FY = '=Prev_FY';

 

I want to create a dynamic variable in load editor for current fiscal year and previous fiscal year. So that I use it in table chart.

2 Replies
Mark_Little
Luminary
Luminary

You will need to use the peek function to populate your variables. 

Let Current_FY = PEEK('Curr_FY',0,'TableName')

Table name being the name of the Table you have created the fields in.

 

aarav021
Contributor III
Contributor III
Author

[DATE_table1]

LOAD

if(Year(max(FISCAL_YEAR))=Year(Today()), Year(max(FINANCIAL_YEAR))) as Curr_FY, if(Year(max(FISCAL_YEAR))=Year(Today()), Year(today()-1)) as Prev_FY Resident [data_table];

Let Current_FY = PEEK('Curr_FY',0,'DATE_table1')

 

Did you mean this ?