Forum Discussion
harikm007
02-23-2022Data Warehouse
Akhila ,
Please check if this script gives you expected result (add this script to the widget where you want to see data till selected date and update the variable 'columnName' with field name):
widget.on('beforequery', function(se, ev){
columnName = 'DATE_OF_JOINING'//replace this with your field name
dashdatefilter = ev.widget.dashboard.filters.$$items.find(el=>el.jaql.column == columnName)
filterjaql = {
to: dashdatefilter.jaql.filter.members[dashdatefilter.jaql.filter.members.length - 1],
custom: true
}
widgetdatefilter = ev.query.metadata.find(el=>el.panel && el.panel == 'scope' && el.jaql.column == columnName)
widgetdatefilter.jaql.filter = filterjaql
})
-Hari