Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Current and Previous Month Sales Comaprison

Hi Friends,


             I have one problem ,my client requirements is sales report on basis of date filed ,suppose i selected Jan-2013

the current Month is Jan-2013 and Previous month is Dec-2012.


           i needed to display report structure like.

        

Date
Sales For Jan-2013Sales For dec-2012
01-01-201320003000
02-01-201325004000
03-01-201322005000
04-01-201321002500
05-01-201350004500

what ever the Dec-2012 value are related to Dec month 01-12-2012,02-12-2012,03-12-2012,04-12-2012,05-12-2012.

same like for every month.


Please help me how to resolve the issue.


Thanks for your support.


Please find the test data for creating report,i want to calculate in UI only not is scripting part.


Thanks & Regards

SHAIK



1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi tresesco,

     thanks for your support,it's working properly, but i needed another help,if i have sale is 0 then i want to take above sales value where value is available,i am sharing excel file,i added yellow color.

really thanks for your support,

Thanks

SHAIK

View solution in original post

17 Replies
Not applicable
Author

I would recommend using a Day field instead of the Date field you have above to avoid confusing your user.  I have attached an example using variables to define the date range.

Anonymous
Not applicable
Author

Hi Rebecca,

           Thanks for your replay,here problem is user is asking with Date field dimensions.

   Please let me know if it is possible or not,because i want to calculate UI only not in back end scripting.

Thanks
SHAIK

Anonymous
Not applicable
Author

Instead of Day you can use the Date field .

It will definitely work.

Anonymous
Not applicable
Author

Hi Nitin,

      

        thanks for your support i tried for that one i did't get the required answer, can you please provide the test application.

above i shared the test data,

Thanks

SHAIK

VishalWaghole
Specialist II
Specialist II

Hi Khadar,

First go to edit script and cerate MonthName field as

MonthName(INVOICE_DT) as InvDtMonthName

then try this exression in your chart

= sum ({<Date = {"=$(=AddMonths(max(InvDtMonthName),-1))"}>}Sales)

Hope it will work for you.

- Regards,

Vishal Waghole

tresesco
MVP
MVP

Dear Shaik,

To resolve this sort of requirement, it is usually taken into the script and followed a well known AsOfDate way.

Doing it in the front end, would be a bit complex. Please see the attached sample.

Anonymous
Not applicable
Author

PFA.

Anonymous
Not applicable
Author

Hi vishal,

      thanks for your replay,i tried what ever the expression you are given,it's not working according to requirement.

if you have any other clue please let me know.

Thanks

SHAIK

sanketkhunte
Creator II
Creator II

Hi Shaik

Tell me which version of Qlikview you are using ?

If you are using 11 or onwards (SR) just create ALTERNATE STATE for current month and previous month : Check these sets in expression.

For more reference : User "What's New in Qlikview 11 - Comparative Analysis point"

Hope this will help.

Thank you

Sanket