Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
venky77777
Contributor III
Contributor III

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

venky77777_0-1715270418792.png

 

 

Labels (5)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

What about  this:

measure2:

=Sum({<Inv_Date={">=$(=addyear(addmonths(monthstart(Max(Inv_Date)),-6),-1) )<=$(= addyear(Max(Inv_Date),-1))"}>}Sales)

View solution in original post

3 Replies
Vegar
MVP
MVP

What about  this:

measure2:

=Sum({<Inv_Date={">=$(=addyear(addmonths(monthstart(Max(Inv_Date)),-6),-1) )<=$(= addyear(Max(Inv_Date),-1))"}>}Sales)

venky77777
Contributor III
Contributor III
Author

Thanks @Vegar . that's working.

Vegar
MVP
MVP

Glad to help ☺️