Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello Power BI gurus,
I'm trying to create the following Measure based on the logic below. Data source is located in Report Sharepoint.
Sum of items sold in Week 26 - Sum of items sold in Week 25 = 4 or (4+3) - (2+1) = 4
| Week Number | Item Sold |
| 24'W26 | 4 |
| 24'W26 | 3 |
| 24'W25 | 2 |
| 24'W25 | 1 |
| 24'W24 | 4 |
| 24'W24 | 5 |
| 24'W23 | 8 |
| 24'W23 | 7 |
| 24'W23 | 6 |
| 24'W22 | 5 |
I've tired with the following formula however still unbale to get it to work. Would appreciate any guidance given.
WoW Item sold = SUM('Report SharePoint'[Week Number IN {"24'W26"}) - SUM('Report SharePoint'[Week Number IN {"24'W25"})
Solved! Go to Solution.
@reubanrao93 , You can create a measure using variables
ItemsSoldDifference =
VAR Week26Sales = CALCULATE(SUM('Table'[Item Sold]), 'Table'[Week Number] = "24'W26")
VAR Week25Sales = CALCULATE(SUM('Table'[Item Sold]), 'Table'[Week Number] = "24'W25")
RETURN
Week26Sales - Week25Sales
Proud to be a Super User! |
|
@reubanrao93 , You can create a measure using variables
ItemsSoldDifference =
VAR Week26Sales = CALCULATE(SUM('Table'[Item Sold]), 'Table'[Week Number] = "24'W26")
VAR Week25Sales = CALCULATE(SUM('Table'[Item Sold]), 'Table'[Week Number] = "24'W25")
RETURN
Week26Sales - Week25Sales
Proud to be a Super User! |
|
Hi @reubanrao93 -create a measure that calculates for week-over-week difference as below.
WoW Item Sold =
CALCULATE(
SUM('Report SharePoint'[Item Sold]),
'Report SharePoint'[Week Number] = "24'W26"
) -
CALCULATE(
SUM('Report SharePoint'[Item Sold]),
'Report SharePoint'[Week Number] = "24'W25"
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 21 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 66 | |
| 56 | |
| 45 | |
| 44 | |
| 30 |