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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
FatalLordes
New Member

New User - Question about Date Manipulation

Hi All.  Very new user to PowerBI.  My data source presently is a CSV file.  It includes date start and end fields.  What I need to do is run a filter on the date start as I only want to show data where the date start is EITHER 7 days before the date the report is run or 4 weeks after the date the report is run.  I don't want to see data for anything outside of that range.  I've worked out using relative date is the trick but I only seem to be able to do one or the other when using relative date?  As in I can either show 7 days prior, or I can show 4 weeks after.  I can't work out how to show all data where it is between 7 days prior and 4 weeks after?  What am I missing?

1 REPLY 1
amitchandak
Super User
Super User

@FatalLordes , If you need it with dat selection.

 

Create a disconnected date table. Do not join with date of your table

 

//Date1 is independent Date table
new measure =
var _max1 = maxx(allselected(Date1),Date1[Date])
var _min = _max1+7
var _max = _max1+28
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors