Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
navaneeth79
Contributor II
Contributor II

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

try;

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

View solution in original post

7 Replies
YoussefBelloum
Champion
Champion

Hi,

are you making selections on the Date field ?

navaneeth79
Contributor II
Contributor II
Author

yes, date field is my only dimension

YoussefBelloum
Champion
Champion

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

aggr_function( {<Date_field=>}   Measure)

OmarBenSalem

try;

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

navaneeth79
Contributor II
Contributor II
Author

this should be added in measure? am I right

OmarBenSalem

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
Contributor II
Contributor II
Author

thanks for your replies, I will check it out