Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension is a variable

Hi Guys,

I have the date as a dimension for a bar chart. I want to use a slider as a variable tell the chart how many days to actually display. The practicality around this is not important, just would like to know how to add variables to a dimension like this.

Thanks all,

Byron

2 Replies
Not applicable
Author

Hi Byron,

You can filter the duration in the Dimension using if statement.

If (Date> from and Date<to, values)

if possible please upload sample QVW file with test data.

erichshiino
Partner - Master
Partner - Master

I agree with this approach.

An alternative would be to include a filter on all the expressions in the chart using Set-Analysis. The advantage would be the use of the same expressions in different object.

The expression would look like this:

sum({<DATE={'>$(date1)<=$(date2)'}> } VALUE)

Rgds,

Erich