Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qliksense_77
Creator
Creator

Graph show specific years if no selection

Hi,

I have data with years 2018 to 2021.

I want my graph to only show 2020 and 2021 if no years is selected in the filter (years).

If  years are selected in the filter then the graph should display the selected years.

What is the expression for this?

1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi,

You can try this. 

If( getselectedcount ( Year ) = 0,

Match( Year, Year( Today()), Year( Today ()) - 1),

Year

)

This will always get the current year and last year for you. If you haven't selected anything.

Jordy 

Climber 

 

Work smarter, not harder

View solution in original post

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi,

You can try this. 

If( getselectedcount ( Year ) = 0,

Match( Year, Year( Today()), Year( Today ()) - 1),

Year

)

This will always get the current year and last year for you. If you haven't selected anything.

Jordy 

Climber 

 

Work smarter, not harder