Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Range Selection

I want to assign a particular date range in a chart. e.g From Previous Month till Date (Today), So that data displayed in the chart only shows the the data belonging to the previous month till the current day. how can I achieve this? Can anyone give me example of the expression I should use?

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

If you have a date field for example DateDimension in your data then use this

=Sum({<MonthDimension=, YearDimension=, QuarterDimension=, DateDimension={'>=$(=MonthStart(Today(), -1))<=$(=Today())'}>} Sales)

MonthDimension=, YearDimension=, QuarterDimension=,  Excludes the selection in Month/Year/QuarterDimensions

If you have Week or Day dimensions exclude like this

If this expression not works then check whether the date formats of the DateDimension and Today() are same.

Hope this helps you.

Regards,

Jagan.

View solution in original post

3 Replies
israrkhan
Specialist II
Specialist II

hi,

i think this will help you, if not let us know..

http://community.qlik.com/message/288110#288110

Khan

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you have a date field for example DateDimension in your data then use this

=Sum({<MonthDimension=, YearDimension=, QuarterDimension=, DateDimension={'>=$(=MonthStart(Today(), -1))<=$(=Today())'}>} Sales)

MonthDimension=, YearDimension=, QuarterDimension=,  Excludes the selection in Month/Year/QuarterDimensions

If you have Week or Day dimensions exclude like this

If this expression not works then check whether the date formats of the DateDimension and Today() are same.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thankyou for helping.. I have achieved the goal using Set Analysis