Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sureshbn21
Contributor
Contributor

Masters calender

Hi,

Here default selection is weekend dates(sat,sun) .when I was deselected  invoice year filter all the dates are showing (holidays,non holidays) .my requirement is when i was selected defualt filter invoice year data showing in all the dates.(now my defualt Selection is weekend dates)

Can you please help me on this.

Thanks,

Bnsuresh.

 

 

1 Solution

Accepted Solutions
nikolay_dolgono
Partner - Contributor II
Partner - Contributor II

Hi, @sureshbn21 !

Could you please give more details?

Is the problem in selection logics? Did you create calendar manualy, or use auto.Calendar? Visual form you selecting in is extension, simple filter object or Qlik dashboard bundle -> Calendar ?

View solution in original post

3 Replies
nikolay_dolgono
Partner - Contributor II
Partner - Contributor II

Hi, @sureshbn21 !

Could you please give more details?

Is the problem in selection logics? Did you create calendar manualy, or use auto.Calendar? Visual form you selecting in is extension, simple filter object or Qlik dashboard bundle -> Calendar ?

sureshbn21
Contributor
Contributor
Author

Hi,

This calendar is extension object.i need to when I was deselect the filter all the dates are showing.(now my calendar default selection is weekend dates(sat,sun) but I need to default selection is all the dates required (holidays,non holidays also)

This is my actually requirements.can you help me on this

Thanks,

Bnsuresh

nikolay_dolgono
Partner - Contributor II
Partner - Contributor II

Every extension can produce its own logics. If we consider Extension -> Qlik dashboard bundle -> "Date picker", then selecting date interval this extension select apropriate values in date field. You can change selection in filter pane, but it can change also by internal selection logics. It is not quite obvious for user.

Because of it I recommend either create data island with only calendar date field and make this field hidden (SET HidePreffix script variable) and use some variables for your expression, or use variables directly (without this extension).

 

Anyway, variables should be created. For example

//Last date most frequently used variable

SET vMaxDate = "=Date(Max({$} [Calendar date]))";

//This variable help use in calculations last weekends

SET vMaxWeekendInterval = "='>='&Date(Max({$<[Calendar weekday]*={'Saturday'}>} [Calendar date]))&'<='&Date(Max({$<[Calendar weekday]*={'Saturday','Sunday'}>} [Calendar date]))";

...

 

Then you can use it in measures like this (try to make you own logics, in this example I calculate Amount in last weekend):

Sum( {$<[Date]={"$(vMaxWeekendInterval)"}>} [Amount])

 

If you want to choose days of week, use standart filterpane or extension SimpleFieldSelect (https://developer.qlik.com/garden/598c6b041cfdc8bde4c49def) on island field

Then create variable

SET vWeekDays = "=Concat({$} Distinct Chr(39)&[Calendar weekday]&Chr(39), ',')";

Then use it in your reports

Sum( {$<[WeekDate]*={$(vWeekDays)}>} [Amount])

 

Or you can choose for selections field in your model, but you should be very careful applying selections

 

It would be greate if you can divide user selection and reports filter. It would be easy to create and support. Every your variable can be configured in script and you can make very complicated logics.

 

But if not you can use special extensions (SimpleFieldSelect can also do it) for applying selection or make your own based on API https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/APIs/Content/CapabilityAPIs/FieldAPI...