Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
VishalSingh18
Contributor III
Contributor III

I want to display recent 2 years(current & prior) on a bar or line with month as dimension

Hello

My Date Dimension is CreatedDate and I want the graph to dynamically show values for the recent 2 years using 2 different lines/bar but event after lots of searching through community nothing seems to work

right now I am using Month(CreatedDate) along with year(CreatedDate) but it will just keep adding more lines as year count increases

Please help me with it

Thanks

Labels (2)
1 Solution

Accepted Solutions
Kush
MVP
MVP

Create Month & Year field in your data model using calendar.

Then create line chart

Add 2 Dimensions:

1) Month

2) aggr(only({<Year={">=$(=max(Year)-1)"}>}Year),Year)

Measure:

Sum(Sales)  or whichever measure you want to select

View solution in original post

2 Replies
Kush
MVP
MVP

Create Month & Year field in your data model using calendar.

Then create line chart

Add 2 Dimensions:

1) Month

2) aggr(only({<Year={">=$(=max(Year)-1)"}>}Year),Year)

Measure:

Sum(Sales)  or whichever measure you want to select

View solution in original post

VishalSingh18
Contributor III
Contributor III
Author

Thank you very much i really helped