
Contributor III
2024-05-09
12:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to show last 6 months Sales in current year and previous year 6 months Sales in line chart
Hi friends,
how to show last 6 months in current year and the same 6 months in previous year in line chart in Qliksense?
dimension: inv_months
measure1:=Sum({<Inv_Date={">=$(=addmonths(monthstart(Max(Inv_Date)),-6))<=$(=Max(Inv_Date))"}>}Sales)
how to write measure2? for example like below table, need to display in line chart
1 Solution
Accepted Solutions

MVP
2024-05-09
12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What about this:
measure2:
=Sum({<Inv_Date={">=$(=addyear(addmonths(monthstart(Max(Inv_Date)),-6),-1) )<=$(= addyear(Max(Inv_Date),-1))"}>}Sales)
Vegar
Qlik Community MVP
Qlik Community MVP
3 Replies

MVP
2024-05-09
12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What about this:
measure2:
=Sum({<Inv_Date={">=$(=addyear(addmonths(monthstart(Max(Inv_Date)),-6),-1) )<=$(= addyear(Max(Inv_Date),-1))"}>}Sales)
Vegar
Qlik Community MVP
Qlik Community MVP

Contributor III
2024-05-09
12:32 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Vegar . that's working.

MVP
2024-05-09
01:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to help ☺️
Vegar
Qlik Community MVP
Qlik Community MVP
926 Views
