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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
n3ptune
Helper II
Helper II

Set today's week no (year starting from April) as max value in filter

Hello i have fin year 1/4-31/3 and i want to have a filter with between slider for week no.

I want to set the max value of the slider to be the today's week No.

 

1 REPLY 1
amitchandak
Super User
Super User

@n3ptune , You have to create a column like this 

Week Type = Switch( True(),
[start week]<=Today() && [end date]>=Today(),"This Week" ,
[start week]<=Today()-7 && [end date]>=Today()-7,"Last Week" ,
[Week Name]
)

 

or

new column =

var _date = max(Table[Date])

return

Switch( True(),
[start week]<=_date && [end date]>=_date ,"This Week" ,
[Week Name]
)

 

for week start and end refer

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.