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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SimuQuery
Frequent Visitor

Creating a measure to show testing completed last week

Hi, 

 

I am trying to create a measure to show the number of tests that were changed to testing complete last week. I have created a week column that has assigned all change dates a week number e.g. 14/10/2024 change date is week 42.

 

I have experimented with many different formats and do not seem to be getting anywhere:

 
CALCULATE(COUNTROWS(' Project Test'[Project Test Completed],
KEEPFILTER(MAX('Project Test'[Week]-1))))
 
Project Test Completed is a measure I have already created that pulls all project tests in status testing complete. The week measure has generated a column that ascribes a value to all rows based on when the item was changed to complete. I am lost as how to proceed. Please help! 
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@SimuQuery , Try using 

 

LastWeekTestsCompleted =
VAR CurrentWeek = MAX('Project Test'[Week])
VAR LastWeek = CurrentWeek - 1
RETURN
CALCULATE(
[Project Test Completed],
'Project Test'[Week] = LastWeek
)




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
SimuQuery
Frequent Visitor

That worked a treat - thank you so much! 

bhanu_gautam
Super User
Super User

@SimuQuery , Try using 

 

LastWeekTestsCompleted =
VAR CurrentWeek = MAX('Project Test'[Week])
VAR LastWeek = CurrentWeek - 1
RETURN
CALCULATE(
[Project Test Completed],
'Project Test'[Week] = LastWeek
)




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

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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