data of previous week

ahmedismailfourtex

Board Regular
Joined
Apr 28, 2015
Messages
124
hello,
I have sales table like this.

productweeksales
x110
y115
z120
x220
y210
z215

<tbody>
</tbody>

and I need to have column of sales in previous week, so I can calculate the variance of any specific product. I am using Power BI.
can I get help ?:)
Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi
Try with calculated column
Code:
=CALCULATE(VALUES(Table1[sales]),FILTER(ALL(Table1[week],Table1[sales]),EARLIER('Table1'[week])=('Table1'[week]+1)))
Regards,
 
Upvote 0
Hi
Try with calculated column
Code:
=CALCULATE(VALUES(Table1[sales]),FILTER(ALL(Table1[week],Table1[sales]),EARLIER('Table1'[week])=('Table1'[week]+1)))
Regards,
Thank you for respond, when I am calculating variance "diff. between current and previous" in calculated column it gives circular error !, I need that variance in a column to calculate average variance.
Any idea how to deal with it ?
thanks
 
Last edited:
Upvote 0
Hi
I need that variance in a column to calculate average variance.
Could you upload your example to dropbox or other place for testing?
Regards,
 
Upvote 0
Hi
But I do not understand a structure of "Solution in excel". For "ANDY /W" article for 13 week you have change -2408, but total sale for 12 and 13 is 0. How do you calculate that change value? Do I understand you rightly that average is calculated for all non-blank values of change?
 
Upvote 0
Hi
But I do not understand a structure of "Solution in excel". For "ANDY /W" article for 13 week you have change -2408, but total sale for 12 and 13 is 0. How do you calculate that change value? Do I understand you rightly that average is calculated for all non-blank values of change?
Sorry for delay and sorry if it disturbed you, this value of change is for stock (all fabric) so its logic to see it in minus.
 
Upvote 0

Forum statistics

Threads
1,216,031
Messages
6,128,424
Members
449,450
Latest member
gunars

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