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
Anonymous
Not applicable

Current week/year true or false

I have a column in my data called 'week of' and it displays the date for the Monday of that week. For example, this week the date listed is November 7, 2022.

 

I want to create a new column that provides a true or false value, based on whether the date showing in the week of column is the current week and year.

 

For example: It would show true for the line item with November 7, 2022, in the week of column, but false for November 14, 2022. 

1 ACCEPTED SOLUTION
Bifinity_75
Solution Sage
Solution Sage

Hi @Anonymous , try this calculate column:

Result = 
var _year= YEAR(Table_example[Date])
var _week=WEEKNUM(Table_example[Date])
var actual_week=WEEKNUM(TODAY())
var actual_year= YEAR(today())
return 
IF(_year=actual_year && _week=actual_week,"True","False")

- The result:

Bifinity_75_0-1667941036707.png

 

Best regards

 

View solution in original post

1 REPLY 1
Bifinity_75
Solution Sage
Solution Sage

Hi @Anonymous , try this calculate column:

Result = 
var _year= YEAR(Table_example[Date])
var _week=WEEKNUM(Table_example[Date])
var actual_week=WEEKNUM(TODAY())
var actual_year= YEAR(today())
return 
IF(_year=actual_year && _week=actual_week,"True","False")

- The result:

Bifinity_75_0-1667941036707.png

 

Best regards

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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