Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
gerrycastellino
Creator III
Creator III

using date range in a calculated dimension

How do I get my date  to read from 2 variables in the dimension.

I know I could use aggr , having difficulty constructing the syntax.

=aggr(only({<xDate='>=' &vMinDate & '<=' &vMaxDate >} xDate), xDate)

see attached.

 

Gerry.

5 Replies
Vegar
MVP
MVP

Your only set modifier looks a bit off.
Try something like this.

aggr(only({<xDate='{">=$(=$(vMinDate)) <= $(=$(vMaxDate))}" >} xDate), xDate)
gerrycastellino
Creator III
Creator III
Author

 Did not work.... 😞

PrashantSangle

can you explain little bit more about your requirement.
What is dimension? what is measure? and what is chart type??
Instead of using date range in calculated dimension, use it in measure.
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Vegar
MVP
MVP

First make sure that your Only() expression works. Create a straight table with xDate as dimension and your Only expression without the aggr() as a measure.
gerrycastellino
Creator III
Creator III
Author

Prashant:

Just trying to drive my date dimension from 2 input date variables vMinDate, vMaxDate.

some of the trigger functionality in QV is a bit erratic,  trying to work around that.

Gerry.