Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
can someone please help me how to create YTD & MTD buttons in qliksense from script load.
I have requirement where by clicking the YTD buttons all the data will be selected as per YTD.
Regards,
khadar
Consider creating a master calendar where you define YTD and YTM as field based on the master date field.
IF(NUM(NUM(Month(DateField),'00')&NUM(Day(DateField),'00'))
<= NUM(Month(today()),'00')&NUM(Day(today()),'00'),1,0) as Date_YTD,
NUM(NUM(Month(DateField),'00')&NUM(Day(DateField),'00'))
>= NUM(Month(today()),'00')&NUM(1,'00')
and NUM(NUM(Month(DateField),'00')&NUM(Day(DateField),'00'))
<= NUM(Month(today()),'00')&NUM(Day(today()),'00'),1,0) as Date_MTD
please check in script editor for missing ')' since i wrote this script from memory.
Then you can easily filter Date_YTD = 1 or Date_YTM =1