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

Limiting a dimension range (set analysis ?)

Hi,

I am charting a metric by a date x-axis.

I am actually showing side by side two charts of the same metric - one by month resolution and another by days/weeks.

I want to limit the day resolution to only the last 60 days - no matter what is the date selection.

Can this be done ?

Thanks

Gur

2 Replies
Gysbert_Wassenaar

For the last 60 days leading up to the selected date:

sum({<MyDate={'>$(=max(MyDate)-60)<=$(=max(MyDate))'}>} Amount)

For the absolute last 60 days:

sum({<MyDate={'>$(=max({1}MyDate)-60)'}>} Amount)

Change MyDate and Amount with the name of your date field. Change sum and Amount to whatever you're trying to calculate.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert.

If I understand correctly, This is excellent for calculating a specific value. Thats great. Thanks

My big problem now is that I want to chart a value (metric) on a line chart.

The x-axis is of type date.

But I want to limit the dates to show only the last 90 days, no matter whats the selection. Limiting the dimension.

Can this be done ?

Thanks