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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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
Partner - Champion II
Partner - Champion II

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
Partner - Champion II
Partner - Champion II

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
Partner - Champion II
Partner - Champion II

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