Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
navaneeth79
Not applicable

QlikSense Dimension

In Qliksense app for a line chart when we give date field as dimension we are getting only current month data, I want previous month data also, anyone could help me out.

1 Solution

Accepted Solutions
OmarBenSalem
Not applicable

Re: QlikSense Dimension

try;

sum({<  DateField={">= $(=addMonths(max(DateField),-1)) <= $(=max(DateField))"} >}YourMeasure)

7 Replies
YoussefBelloum
Not applicable

Re: QlikSense Dimension

Hi,

are you making selections on the Date field ?

navaneeth79
Not applicable

Re: QlikSense Dimension

yes, date field is my only dimension

YoussefBelloum
Not applicable

Re: QlikSense Dimension

you can add this to your measure to detach your month field or date field selection:

aggr_function( {<Date_field=>}   Measure)

OmarBenSalem
Not applicable

Re: QlikSense Dimension

try;

sum({<  DateField={">= $(=addMonths(max(DateField),-1)) <= $(=max(DateField))"} >}YourMeasure)

navaneeth79
Not applicable

Re: QlikSense Dimension

this should be added in measure? am I right

OmarBenSalem
Not applicable

Re: QlikSense Dimension

Yes; please refer to this thread:

YTD, MTD issue

it should guide how and when/where to use such expressions !

Hope it would be useful

navaneeth79
Not applicable

Re: QlikSense Dimension

thanks for your replies, I will check it out