Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
H - I have data which is refreshed daily, but there is an element of our app which shows data on a weekly basis (Monday to Sunday). If the app is refreshed on, say, the Tuesday, I don't want any of this 'partial' week to show. I only just want to show complete weeks, not partial weeks.
I have a date table, so just really need some ideas as to how to create this, either in Power Query, or as a DAX expression?
Many thanks!
Solved! Go to Solution.
You could create a column like
Before Current Week =
VAR StartCurrentWeek =
TODAY () - WEEKDAY ( TODAY (), 2 ) + 1
VAR Result = 'Date'[Date] < StartCurrentWeek
RETURN
Result
Hi All,
Firstly johnt75 thank you for your solution!
And @Creative_tree88 ,According to your question, you can also do it in power query to keep the complete week, we first calculate the weekend date for each row, then in another column we use to mark the week as complete or not, and finally in desktop, we filter the data by IsCompleteWeek column to show only the data with value 1.
EndOfWeek = Date.EndOfWeek([Date], Day.Sunday)
if Date.From(DateTime.LocalNow()) >= [EndOfWeek] then 1 else 0
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Firstly johnt75 thank you for your solution!
And @Creative_tree88 ,According to your question, you can also do it in power query to keep the complete week, we first calculate the weekend date for each row, then in another column we use to mark the week as complete or not, and finally in desktop, we filter the data by IsCompleteWeek column to show only the data with value 1.
EndOfWeek = Date.EndOfWeek([Date], Day.Sunday)
if Date.From(DateTime.LocalNow()) >= [EndOfWeek] then 1 else 0
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
You could create a column like
Before Current Week =
VAR StartCurrentWeek =
TODAY () - WEEKDAY ( TODAY (), 2 ) + 1
VAR Result = 'Date'[Date] < StartCurrentWeek
RETURN
Result
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
144 | |
73 | |
64 | |
52 | |
51 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |