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

Need Help in variable..

Hello All,

In my applications year is displaying 2010,2011,2012 only.My financial year-end is March-2012.

In my applications they taken year=2012. now i created variable

LET CURRENT_YEAR = (YEAR(YEARSTART(NUM(TODAY()),0,4))+1);

LET CURRENT_MONTH = IF(NUM(MONTH(NUM(TODAY())))>3,NUM(MONTH(NUM(TODAY())))-3,NUM(MONTH(NUM(TODAY())))+9);

it is showing year=2012 and month=12 now it is correct,but what happen for next month(i.e.,after financial year-end).this will work.

can any one give some idea for creating variable,i.e.,it will displays in text box in my final appilication like date-month-year is 01-Apr-2012.

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this expression.

=Date(YearStart(Today(),0, 4), 'DD-MMM-YYYY')

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

     I think current financial year is 2011 then this should be (no need +1)

LET CURRENT_YEAR = YEAR(YEARSTART(NUM(TODAY()),0,4));

     Check with this

=Date(AddMonths(YearStart(MakeDate(CURRENT_YEAR,CURRENT_MONTH),0,4),1+CURRENT_MONTH), 'DD-MMM-YYYY')