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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Automatically change date based on actual Week & Month

Hi everyone, 

 

I have a problem with month - week based results and i didn't find an option that allows me to show the results of each month in filter relative date, what i actually want is a filter that change automatically the actual month showing at the column header and the results, by example:

This is my current month and the past 5 months:

 

EfstepsTP_2-1603064848671.png

What i want is that in november the entire information changes automatically and shows me november results and past 5 months:
like this:

 

EfstepsTP_3-1603065122523.png

same thing with weeks, show the last 4 week year

I want to do it in the dimdate table

 

EfstepsTP_4-1603065346470.png

 


because there's a lot of values calculated and i want to avoid make a measure for each one, just do it like a date filter


Thank you very much for reading.

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , For this best, is relative date filter.

 

Or you have to create a column like this in date table

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

Also, you have to use this approach of the trend with the above filter

https://www.youtube.com/watch?v=duMSovyosXE

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Excellent, worked so well, how can i do that for the week year number? like Week 39, 40, 41, 42?

Anonymous
Not applicable

@Anonymous  Combinevalue(" ", "Week " , Weeknum(date(date))

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.