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

Sumit kumar thakur

If i select year and month, is it possible that the first day of that month and year gets selected automaticallly.

if yes give the solution

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use trigger(On select) for the both year and month fields which you can found in the document properties-->Triggers tab.

     Action:Select in field

     Field Name:DateField

     Search String:=if(GetSelectedCount(Month)>0 and GetSelectedCount(Year)>0, MakeDate(Max(Year), Max(Month), 1 ))

Hope it helps

Celambarasan

View solution in original post

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use trigger(On select) for the both year and month fields which you can found in the document properties-->Triggers tab.

     Action:Select in field

     Field Name:DateField

     Search String:=if(GetSelectedCount(Month)>0 and GetSelectedCount(Year)>0, MakeDate(Max(Year), Max(Month), 1 ))

Hope it helps

Celambarasan

Not applicable
Author

The answer u have given me works correctly when i select monthname and year, but when i select financialyear instead of normal year it gives the following result ---

i select financial year = 2009-2010 and month = sep , it show 01/09/39904

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check what this expression returns on selecting financial year?

     =Max(Year)

     Did you used the above expr or Max(FinancialYear)?

Celambarasan

Not applicable
Author

i have try out this expression

if(GetSelectedCount(MonthName)>0 and GetSelectedCount(FinancialYear)>0, MakeDate(Max(FinancialYear), Max(MonthName), 1 ))

and output is 01/09/39904

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Do you have a year field?

     if so use that year field instead of Financial Year.

     Check with the below expr.

if(GetSelectedCount(MonthName)>0 and GetSelectedCount(FinancialYear)>0, MakeDate(Min(Year), Min(MonthName), 1 ))

Celambarasan