Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am new to Qlik Sense. Can anyone please help me with currect solution 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.
Hi @aarav021
if your data table has only one single row or you just need one record, you will need to use peek
your_new_table_name:
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,'your_new_table_name')
but if table is bigger or need to read more records, you will need to use a WHILE or FOR to read it
Hope this helps.
Best,
help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 😁