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
OCBB_SFAFPandA
Resolver I
Resolver I

Creating time slicers that default to the current year/week/day

Hello,

 

I am trying to create some slicers that automatically update. The relative date in the filter pane is not working for me due to the time zone.

I am looking for 3 default slicers that default year, weeks, and weekday.

 

I created a current year formula based on another thread

Current Year = IF('Date'[Date].[Year] = MAX('Date'[Date].[Year]), "Current Year", FORMAT('Date'[Date].[Year], "####"))

When I try this for week, I am picking up 52 weeks as the max, even though this year doesn't have that week yet. I am supposed to put a calc in for the current year it looks like, would that be a filter function somewhere?

 

Once the week formula is done, the day formula should be similar? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @OCBB_SFAFPandA ,

 

No, it's local time.

Yes, you could use weeknum(max(date)) instead. And you will need to add year condition too.

Current Week = IF(WEEKNUM('Date'[Date]) = WEEKNUM(MAX('Date'[Date]))&&YERA('Date'[Date])=YEAR(MAX('Date'[Date])), "Current Week", WEEKNUM('Date'[Date]))

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @OCBB_SFAFPandA ,

 

You could use today() function instead.

Current Year = IF('Date'[Date].[Year] = YEAR(TODAY()), "Current Year", FORMAT('Date'[Date].[Year], "####"))
Current Year = IF(WEEKNUM('Date'[Date]) = WEEKNUM(TODAY()), "Current Week", WEEK('Date'[Date]))

 

Best Regards,

Jay

Thanks for the comment. For the 'TODAY' function, does it update with UTC timezone? I had this issue using the relative time date filter pane. If so, I am not able to use the today function. 

Edit - I am trying to use the max date for invoices and replace it with 'today'. hopefully it works. 

Anonymous
Not applicable

Hi @OCBB_SFAFPandA ,

 

No, it's local time.

Yes, you could use weeknum(max(date)) instead. And you will need to add year condition too.

Current Week = IF(WEEKNUM('Date'[Date]) = WEEKNUM(MAX('Date'[Date]))&&YERA('Date'[Date])=YEAR(MAX('Date'[Date])), "Current Week", WEEKNUM('Date'[Date]))

 

Best Regards,

Jay

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.