Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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?
Solved! Go to Solution.
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
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.
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