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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.