Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default month filter on Sense application

Do we need to create a variable

and i am having an field MonthDate which consists of 6 months and i wanted to show one specific month in my default selections how can i create the variable and apply it on the field?

1 Solution

Accepted Solutions
Michael_Tarallo
Employee
Employee

Here is an example -

This Month's Sales - using the month value of March or Mar as a string or literal value in the Set Analysis Expression:

Sum({$<Month={'Mar'}>}Sales)

This example shows an example of Dynamic Set Analysis - using the Month() and Today() functions to get the current month automatically or dynamically.

Sum({$<Month={'$(=Month(Today()))'}>}Sales)

When using function within expressions for the modifier you need to surround the expression like this:
$(= some_expression() )

Sum({$<Month={'$(=Month(Today()))'}>}Sales)

This expansion syntax allows functions to be evaluated in the Set Analysis Expressor for search and comparison etc.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik

View solution in original post

4 Replies
Michael_Tarallo
Employee
Employee

Hi Chinna - you do not need to create a variable if using Set Analysis - check out this video first:

A Beginners' Introduction to Set Analysis

and let me know if you still require assistance. I will attach a sample for you too.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

Here is an example -

This Month's Sales - using the month value of March or Mar as a string or literal value in the Set Analysis Expression:

Sum({$<Month={'Mar'}>}Sales)

This example shows an example of Dynamic Set Analysis - using the Month() and Today() functions to get the current month automatically or dynamically.

Sum({$<Month={'$(=Month(Today()))'}>}Sales)

When using function within expressions for the modifier you need to surround the expression like this:
$(= some_expression() )

Sum({$<Month={'$(=Month(Today()))'}>}Sales)

This expansion syntax allows functions to be evaluated in the Set Analysis Expressor for search and comparison etc.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Not applicable
Author

Hi Mike,

I have gone through your post and it was really helpful.

I have a query, Set analysis you mentioned above works fine at the chart level when you have sales. I am stuck with different problem and need your inputs on this.

I have a Date filter with some 12 weeks in it and user wants to have default selection as Max(week) in the filter when he opens the app.I am using web version of qliksense and couln't find anything.

Is there any work around for this?

Thanks,

Prasant Tata

Yogesh2020
Partner - Contributor
Partner - Contributor

Hi, thank you for the info. This is fine but how to set default filter for that on sheet on top on opening of sheet everytime. That is when we open any sheet, we see filter applied to all charts of suppose last 7 days. We should be able to cancel that filter on top to see all data.