Calculating the deltas in weekly sales

ficklelife

New Member
Joined
Aug 17, 2015
Messages
4
I have a table Sales which contains data such as:

[TABLE="width: 500"]
<tbody>[TR]
[TD]id[/TD]
[TD]date[/TD]
[TD]name[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]2016-04-21 14:22[/TD]
[TD]Jims Nuts[/TD]
[TD]200[/TD]
[/TR]
</tbody>[/TABLE]

I have visualised my weekly sales by creating a new column with the formula
Code:
week_number = WEEKNUM('Sales'[date])
which gives me a column with 1,2,3 etc based on the week it was sold based on date column.

I would then like to visualise in a waterfall chart the deltas week to week in sales - e.g. Sales in week 3 compared to week 2 is 20k deficit, week 4 compared to 3 is 30k up, etc... How would I write a DAX query to visualise this data?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi

create new calculated column name WEEKNUMBER using =WEEKNUM([date])

to get week 1 total Week1Tot:=calculate(sum(Table1[Amount]),filter(table1,Table1[WeekNumber]=1))
to get week 2 total Week2Tot:=calculate(sum(Table1[Amount]),filter(table1,Table1[WeekNumber]=2))

Deficit Deficit WK2 Vs Wk 1:=[Week2Tot]-[Week1Tot]

so on...
 
Upvote 0

Forum statistics

Threads
1,224,163
Messages
6,176,814
Members
452,744
Latest member
Alleo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top