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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make dynamic min/max dimensions in charts?

Hi,

Im trying to make a chart where the dimension (date) is always showing 30 dates back from the maximum date among all possible dates.

I have been trying to solve the problem with SET, like this:


=sum( {$<DateCounter = {"<=$(#=max(DateCounter))"}, DateCounter = {">=$(#=max(DateCounter)-30)"}, Date={"*"}, Year={"*"}, Week={"*"}>} [Fact_ProcessTime] )


..but it is not working, the max date is static, only the min date changes.

Anyone got an idea how to solve my problem?



3 Replies
Not applicable
Author

Hi,

You will be able to do this using variable as

set varDate=monthsstart (date(DateCounter), -1 )

Regards!!

Nilupa

Not applicable
Author

This is not what im looking for. I want to be able to choose any point/points in time and automaticaly chose the most recent one and generate the data 30 days back from that date(the most recent).

Any other ideas?

Regards/
Hilman

Not applicable
Author

Hi,

Check below expression would help you.

=sum({<DateCounter = {">=$(=date(max(DateCounter )-30),'MM-DD-YYYY')"}>} MeasureField)

- Sridhar