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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
milkynight
Helper I
Helper I

DAX for comparison of weekly sales vs benchmark

Hi all,

 

Im trying to write a DAX to calculate % difference with benchmark value. The tricky is I will have weekly data added in, so I want to show the % difference per week basis.

 

Below input:

milkynight_0-1632987015171.png

Disired result:

milkynight_1-1632987049649.png

 

Thank you!

 

1 REPLY 1
jppv20
Solution Sage
Solution Sage

Hi @milkynight ,

 

The way to do this is to go to PowerQuery. Select the column with (A, B, C) and choose unpivot other columns. Result:

jppv20_0-1632987888327.png

 

Then you can create a measure like this:

Week vs BM = DIVIDE(SUM(Sales[Value])-SUM(Benchmark[BM]),SUM(Benchmark[BM]),BLANK())
 
Then put it in a Matrix to get this result:
jppv20_0-1632988761629.png

 

 

Jori

 

If I answered your question, please mark it as a solution to help other members find it more quickly.

 
 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.