Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
bertjacobs
New Member

Calculating Differences

Hi,

 

I have the following table with unit sales by product and by store summarized on a 4-weekly basis (4-4-5 scheme, 13 periods a year)

Capture.JPG

Now I would like to create a measure that calculates the difference between 'the sum of the last 13-Periods' and 'the sum of the periods ranging from last-14 till last-26'.

It would be great of course if I could also visualise evolutions from previous years and make it dynamic

Eg the difference between 'the sum of the periods ranging from last-14 till last-26' and 'the sum of the periods ranging from last-27 till last-39'.

And so on.

 

I'm completely new to Power BI so I have no idea if something like the above is possible and if my data is well structured to do this. Any help is highly appreciated 🙂

 

Bert

3 REPLIES 3
Abigail48
Regular Visitor

The table's layout makes it among the Best Router Table most portable tables you'll find, Router Table as well as while it may not be fancy.

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @bertjacobs,

 

Could you please mark the proper answer as solution?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Bert,

 

What is your original data? Based on your data here, you need a table like this:

Period           compare_period

2014-p01           1

2014-p02           1

...                        1

2014-p13           1

2015-p01           2

2015-p02           2

...                        2

2015-p13           2

... ...

Then we can compare the amount by "compare_period".

Could you provide a dummy sample pbix file? At least a sample in text mode.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.