Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. $300 savings extended to February 9th Learn More
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
Highlighted
Employee
Employee

Re: Default month filter on Sense application

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

3 Replies
Employee
Employee

Re: Default month filter on Sense application

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
Highlighted
Employee
Employee

Re: Default month filter on Sense application

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

Not applicable

Re: Default month filter on Sense application

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