Forum Discussion
basyan1991
3 years agoRegular Visitor
How to set current week as default slicer
Hi I tried to follow the below video to set the default slicer as current month in PowerBI. And it works well on my other report. https://www.youtube.com/results?search_query=Set+Default+Slicer...
- 3 years ago
basyan1991 , Try like
var _st= today() +-1*if(WEEKDAY(today())<4,WEEKDAY(today())+3,WEEKDAY(today())-4)
var _end = _st+6
return
if([Date]>=_st && [Date] <=_end, "Today", [Date] &"")
basyan1991
3 years agoRegular Visitor
Thanks for replying! But from what I understand this wont be able to work as I have a different week cycle setting. Starting from Wednesday to next Thursday.
Not sure whether I understand this correctly.
amitchandak
Super User
3 years agobasyan1991 , Try like
var _st= today() +-1*if(WEEKDAY(today())<4,WEEKDAY(today())+3,WEEKDAY(today())-4)
var _end = _st+6
return
if([Date]>=_st && [Date] <=_end, "Today", [Date] &"")
- basyan19913 years agoRegular Visitor
I have tried that on my report. It works perfect now!
Thanks for your help!