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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
reubanrao93
New Member

Creating Measure with Filtered Column

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 NumberItem Sold
24'W264
24'W263
24'W252
24'W251
24'W244
24'W245
24'W238
24'W237
24'W236
24'W225

 

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"})

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
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




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
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




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






rajendraongole1
Super User
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!!





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

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.