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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
cheid_4838
Helper III
Helper III

How to Exclude the last week when a

Spoiler
 The slicer I created selects data from the last 13 weeks and then shows the week start date for those periods in the table below.  The last week of the 13 week period is not visible because there is no data for this particular customer.  I would like the last week to be excluded because it's being it's skewing the average by treating last week as a "0" and skewing some other numbers due to the limited amount of available data.  I tried a couple of different formulas with no luck.  I also tried modifiying the formula below that I created to calculate the week start date.  Can this be modified at all to exclude the last week of the 13 week period? Thanks.

WEEK START DATE = ('Delivery Dates'[Date]-weekday('Delivery Dates'[Date])+1)

cheid_4838_2-1709050402975.png

 



 



cheid_4838_0-1709050212615.png

 

 

2 REPLIES 2
cheid_4838
Helper III
Helper III

Thanks for taking the time to respond to my problem. When I used your formula nothing changed with my results. I am not sure if it has to do with how my dashboard is modeled.  

v-yilong-msft
Community Support
Community Support

Hi @cheid_4838 ,

To exclude the last week of the 13-week period, you can modify your formula for calculating the week start date. Let’s adjust it to exclude the week that corresponds to the most recent data point.

You can change your DAX codes for another try.

WEEK START DATE = 
IF (
    'Delivery Dates'[Date] < MAX('Delivery Dates'[Date]) - 7,
    'Delivery Dates'[Date] - WEEKDAY('Delivery Dates'[Date]) + 1,
    BLANK()
)

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.