8 Replies Latest reply: Oct 30, 2014 3:32 PM by Mei Wang

# How to create a chart comparing sales of this monday to last monday?

I am a new learner to Qlik view, I need to create a table to compare sale of this week to last week.

table like : column--Sale this week, sale last week, % difference

dimension--state

Thank

• ###### Re: How to create a chart comparing sales of this monday to last monday?

I want the chart to be either at a fix date, like compare this Monday to last Monday

Or at a flexible compare, like choose a date and compare to the date of previous week.

Thanks

Mei

• ###### Re: How to create a chart comparing sales of this monday to last monday?

Create a Straight Table

Dimension
State

Expressions

Sales This Week

Label

=Max(SaleDate)

Definition

=SUM({<SaleDate = {'\$(=Max(SaleDate))'}>}sales)

Sales Last Week

Lable

=Date(Max(SaleDate)-7)

Definition

=SUM({<SaleDate = {'\$(=Max(SaleDate)-7)'}>}sales)

%Difference

(Column(1) - Column(2))/Column(1)

or Accordingly ,......

Hope this will help

• ###### Re: How to create a chart comparing sales of this monday to last monday?

Thanks

This week is good

Last week, label is good, but sales give all 0?

Mei

• ###### Re: How to create a chart comparing sales of this monday to last monday?

Hold on my question, I will try again

From: Wang, Mei

Sent: Thursday, October 30, 2014 2:20 PM

Subject: RE:  - How to create a chart comparing sales of this monday to last monday?

Thanks

This week is good

Last week, label is good, but sales give all 0?

Mei

• ###### Re: How to create a chart comparing sales of this monday to last monday?

I double checked,

For last week, label is good, but Sales give all 0

Suggestion?

Thanks

Mei

• ###### Re: How to create a chart comparing sales of this monday to last monday?

=SUM({}sales)

Thanks

From: Wang, Mei

Sent: Thursday, October 30, 2014 2:33 PM

Subject: RE:  - How to create a chart comparing sales of this monday to last monday?

I double checked,

For last week, label is good, but Sales give all 0

Suggestion?

Thanks

Mei

• ###### Re: How to create a chart comparing sales of this monday to last monday?

HI, Manish

More questions:

Now I want to make my table a dynamic one, meaning, the date is not fixed at Max(Saledate), but a date select from list box 'Saledate', how should I set the

Last week sale, Definition?

Thank you very much?

Mei