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

How to calculate previous Date 's sum(Sales)?

Hi,

I am using the below table:

[Data]:
load * inline [
DateData, Sales
12/11/2017, 2012
12/10/2017, 2015
12/09/2017, 2016
12/08/2017, 2017
12/07/2017, 2018
]
;

and use a straight table:

and use DateData as dimension and Sum({$<[Process Date] = {"$(date(only([Process Date]-1)))"}>}[Sales Posting Amount USD]) as expression. But I get '0' for all fields.

Please help me what is wrong in the expression?

Thanks,

Sandip

13 Replies
sunny_talwar

I don't have the source files to run... but will try to do a binary load to try to make it work...

sunny_talwar

Check if this looks good

ananyaghosh
Creator III
Creator III
Author

Hi,

Thanks and Thanks a Lot.

But in your as of calendar I need three more fields like:

previous month, previous week and previous year and last 9 and 6 months flag.

So can u give me that script also. because how can I make difference between weeks and months and year also.

So in this case if you help me I will be very thankful to you.

Please help me for previous month, previous week and previous year and last 9 and 6 months calculations.

I am just waiting for your reply.

Thanks,

Sandip

sunny_talwar

Have you even looked at the script I have provided and the link I have shared? Can you try to give this a try on your end and ask for help if it doesn't help... or if someone else have time, they will help you out....

Best of luck brother....

P.S. As a recommendation, try to provide your requirement in one go (if possible).... I am sure once someone figures this out for you... you must have a list of other things you would like them to add