Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sales Comparisons based on date ranges, yearly 3 months etc

Hi All,

Need some help please, I know its pretty straight forward however I'm still learning the date functions in qlikview.

I basically need the table below replicated in qlikview.

DimensionTotal Sales Last 12 MonthsTotal Sales Previous 3 MonthsTotal Sales Current Month




Thank you

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi jajram944,

Here is just an idea to implement in QlikView:

1. Total Sales Current Month

= Sum({$<MonthID = {$(=Max(MonthID))},Year = {$(=Max(Year))},Quarter = , Month = >} Sales)

2. Total Sales Previous 3 Months

= Sum({$<MonthID = {$(=Max(MonthID)-3)},Year = ,Quarter = , Month = >} Sales)

3. Total Sales Last 12 Months

= Sum({$<MonthID = {$(=Max(MonthID)-12)},Year = ,Quarter = , Month = >} Sales)

It would be greate if you can share sample data.

Regards,

Sokkorn

View solution in original post

5 Replies
Sokkorn
Master
Master

Hi jajram944,

Here is just an idea to implement in QlikView:

1. Total Sales Current Month

= Sum({$<MonthID = {$(=Max(MonthID))},Year = {$(=Max(Year))},Quarter = , Month = >} Sales)

2. Total Sales Previous 3 Months

= Sum({$<MonthID = {$(=Max(MonthID)-3)},Year = ,Quarter = , Month = >} Sales)

3. Total Sales Last 12 Months

= Sum({$<MonthID = {$(=Max(MonthID)-12)},Year = ,Quarter = , Month = >} Sales)

It would be greate if you can share sample data.

Regards,

Sokkorn

Not applicable
Author

Thanks for your help,

Unfortunately I'm unable to share my data.

Is it possible you can explain or break down the expression so I know what to replace each section with to match my data?

Thanks

suniljain
Master
Master

Solution suggested by Sokkorn is perfect and it should definitely work.

Not applicable
Author

It does, Thanks

Not applicable
Author

Thanks