Forum Discussion
cheid_4838
2 years agoHelper IV
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)
2 Replies
- AnonymousNot applicable
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.
- cheid_4838Helper IV
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.