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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply

Flag to show only complete weeks

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!

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

You could create a column like

Before Current Week =
VAR StartCurrentWeek =
    TODAY () - WEEKDAY ( TODAY (), 2 ) + 1
VAR Result = 'Date'[Date] < StartCurrentWeek
RETURN
    Result

View solution in original post

Anonymous
Not applicable

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

 

vxingshenmsft_2-1736733499570.png

vxingshenmsft_3-1736733522570.png

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.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

 

vxingshenmsft_2-1736733499570.png

vxingshenmsft_3-1736733522570.png

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.

 

johnt75
Super User
Super User

You could create a column like

Before Current Week =
VAR StartCurrentWeek =
    TODAY () - WEEKDAY ( TODAY (), 2 ) + 1
VAR Result = 'Date'[Date] < StartCurrentWeek
RETURN
    Result

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.