Calculate Difference from Previous Row Excel & Power Query

preview_player
Показать описание
When you’re compare period data like sales from one month to another, quite often you’ll want to know the difference between the months. In a standard Excel worksheet, this is super easy to do. When you get to a pivot table, also super easy but maybe not quite as intuitive...though it can still be done super easy. The same for Power Query, easy to do but not intuitive. Thanks for coming to this video because I’ll show you these three ways to do subtract value from a previous cell.

0:00 Intro
0:55 Simple Excel Range / Table Example
1:23 Pivot Table Example
2:26 Power Query Example

📝 This description may contain affiliate links and we'll receive a small commission if a purchased is made using the links (but at no additional cost to you). It'll support the channel and so more videos like this can be made. Thanks for your support!

🎁 If you find these videos useful and want to support my channel go to

#excel
#msexcel
#doughexcel
Рекомендации по теме
Комментарии
Автор

it has been 2 years and you are a still a life saver man, thanks! subbed

TheMrWARLORD
Автор

WOW! I've spent hours researching how to create a moving range in Power BI. Your Power Query methodology was spot on! I also wrapped the subtraction with Number.Abs() to use in my mR chart. I just subscribed to your channel too. Thank you Doug!

phildanley
Автор

Thanks, Doug. Your approach and teaching style is very easy to follow.

gregoryregan
Автор

Dude, i have been using PQ for more than 3 years. you are what i'm looking for. I subscribed to your channel in less than 3 min.

bhavanaadimulam
Автор

this is what im looking for! but is there a way to do this in DAX?

reticulan
Автор

This offered a simple solution to my problem, thanks!

jakob
Автор

Very clever Power Query method using two index columns and making a self-referencing merge! Thanks. (I would have been tempted to play around with M code relative cell references, but your approach is much more elegant.)

nboisen
Автор

This is a very simple way to do it. Thanks.

SetitesTechAdventures
Автор

A simple ang ingenious method! Thank you.

pavol.cernak
Автор

Thank you man. You saved my a lot of time.

umairarshad
Автор

Hi Doug. Cool solution! Here's another approach for Power Query. Load data. Add Index Column from 0. Add Custom Column with the following: try #"Added Index"[Units Sold]{[Index]} - #"Added Index"[Units Sold]{[Index]-1} otherwise null. Remove Index Column. Close and Load. A little M saves some steps! Fun to solve in different ways. Thanks and thumbs up!!

wayneedmondson
Автор

GEEZ! I never knew about that Difference in Pivot tables. 😵

OzduSoleilDATA
Автор

New subscriber here, thanks for this very informative video!

MaRc-bmrg
Автор

Hello, what if I have thousands of products, and I sum by product and then by month, then I want to run by product to see the monthly difference. How do I do that in power query now? Thank you!

Sunriseto
Автор

Superb solution, but how to do the same with multiple key columns?

dhruvpanchal
Автор

Dough, did you do a video on how to find and remove duplicate entries where values can be swapped between two columns ?

mattmatt
visit shbcf.ru