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
Sbudd
Helper II
Helper II

Weekly comparison table

Hi 

Is the table below possible to be built in PBI? I can easily build the first 3 columns, but the difference and percent change columns are proving more difficult. I dont mind having it as seperate tables if that is easier. 

It will also be 2 weeks of data. 

 

Thanks in advance

 

Sbudd_0-1717670489226.png

 

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @Sbudd -To includes the first three columns along with the "Difference" and "Percent Change" columns.

You can create a measure for sales week1

Sales_Week1 =
CALCULATE(
SUM('Sales'[Sales]),
'Sales'[Week] = "Week 1"
)

Week2:

 

Sales_Week2 =
CALCULATE(
SUM('Sales'[Sales]),
'Sales'[Week] = "Week 2"
)

To find the difference of week1 and week2 and then find the percent change calculation with difference.

 

Difference = [Sales_Week2] - [Sales_Week1]

 

Percent_Change =
IF(
[Sales_Week1] = 0,
BLANK(),
([Difference] / [Sales_Week1]) * 100
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Anonymous
Not applicable

@Sbudd Here you go, with dynamic format strings.

 

bchager6_1-1717675105550.png

 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Your solution is so great  @Anonymous 
Hi, @Sbudd 

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster. Thank you very much for your kind cooperation!

 

Best Regards

Jianpeng Li

 

Anonymous
Not applicable

@Sbudd Here you go, with dynamic format strings.

 

bchager6_1-1717675105550.png

 

 

 

rajendraongole1
Super User
Super User

Hi @Sbudd -To includes the first three columns along with the "Difference" and "Percent Change" columns.

You can create a measure for sales week1

Sales_Week1 =
CALCULATE(
SUM('Sales'[Sales]),
'Sales'[Week] = "Week 1"
)

Week2:

 

Sales_Week2 =
CALCULATE(
SUM('Sales'[Sales]),
'Sales'[Week] = "Week 2"
)

To find the difference of week1 and week2 and then find the percent change calculation with difference.

 

Difference = [Sales_Week2] - [Sales_Week1]

 

Percent_Change =
IF(
[Sales_Week1] = 0,
BLANK(),
([Difference] / [Sales_Week1]) * 100
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.