Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Current vs Previous Sales by Week Number

Hi everyone, I am battling with an issue that might seem fairly simple to you but quite a bit tricky to me as a beginner.

So I have 2 excel files that I have loaded into my document. One file gives information about sales amounts, cancel amounts, products etc. The second file has all the dates I need for my calendar and both these 2 files join on a key.

The issue here is that my calendar/Dates file has a column named 'Week Num' and the values of this column start from 10 to 20.

This column is not based on any date, it is just numbers. What I need is to be able to sum the sales amount, cancelled sales per product for current 'Week Num' and Previous 'Week Num' like the snapshot below:

WeekNum.png

I would really appreciate any help on this, Thank you.

1 Solution

Accepted Solutions
padmanabhan_ram
Creator II
Creator II

Hi Sello,

check the attache qvw.

Br,

Padmanabhan

View solution in original post

7 Replies
pradosh_thakur
Master II
Master II

you need to provide some sample so that we can help you getting to to the result you provided.

regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

Hi Pradosh, thanks for your response. Please refer to the discussion on this link >> measure for the previous dimension value‌.

I would like to achieve something similar to that except that I do not want to see another column that shows the increase from previous week. I want to be able see and compare the actual totals of the previous and current week sales (Please check out the link above)

padmanabhan_ram
Creator II
Creator II

Hi Sello,

try to use this expression to get previous sales amount.

rangesum(above(sum( [Current Week Sales Amount]),1))

br,

Padmanabhan

Anonymous
Not applicable
Author

Hi Padmanabhan, thanks for this response. it seems like a solution I am looking for. May you please show me how an expression for current sales amount would then look like?

padmanabhan_ram
Creator II
Creator II

Hi Sello,

check the attache qvw.

Br,

Padmanabhan

pradosh_thakur
Master II
Master II

Hi sello

i understood your question but we need some data to work with. You can prepare some sample data in excel which should be similar to your data model and post it here so we can work on that and help you easily with your requirement.

Learning never stops.
padmanabhan_ram
Creator II
Creator II

Hi Sello,

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.


Br,

Padmanabhan