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
jpt1228
Responsive Resident
Responsive Resident

Measure to remove table filter to add sales orders for next 14 days in the future from today

Hello, I have a matrix visual that is filtered by a relative date filter. I want to create a measure that will ignore that filter and bring in sales orders that are in the next 14 days fom today.

 

Here is what I have so far. But it is bringing in all the sales orders in the future.

 

Sales Orders After Today No Filter = CALCULATE(FactSalesOrderLines[Cases Ordered],
DATEADD(DimDate[Date],+14,DAY),
FILTER (
ALL(DimDate[Date]),
DimDate[Date] > TODAY()
)
)

2 ACCEPTED SOLUTIONS
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @jpt1228

 

Here is one way to do it.  Just make sure you use the Date field from DimDate on your Axis and may need to remove the relationship between the two tables.

 

Sales Orders After Today No Filter = 
	CALCULATE(
		SUM(FactSalesOrderLines[Cases Ordered]),
		FILTER(
			'DimDate',
				[Date]>=TODAY() && 
				[Date]<TODAY()+14
				)
		)

  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

Hello @Phil_Seamark - I was able to get this to work in a new matrix visual but when I add the measure into the other matrix visual that has relative date filtering it doesn't work.

 

Here is the formula that I got to work. Since I had a page filter using the relative date filter set to "Today" This formula works to bring in the sales in the next 14 days from the page filter date. This also works to bring in sales previous to the date filter as well.

 

SO Cases in next 14 days =
CALCULATE(
FactSalesOrderLines[Cases Ordered],
DATESINPERIOD(DimDate[Date],
LASTDATE(DimDate[Date]),
+14, DAY
))

 

Thanks

View solution in original post

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @jpt1228

 

Here is one way to do it.  Just make sure you use the Date field from DimDate on your Axis and may need to remove the relationship between the two tables.

 

Sales Orders After Today No Filter = 
	CALCULATE(
		SUM(FactSalesOrderLines[Cases Ordered]),
		FILTER(
			'DimDate',
				[Date]>=TODAY() && 
				[Date]<TODAY()+14
				)
		)

  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hello @Phil_Seamark - I was able to get this to work in a new matrix visual but when I add the measure into the other matrix visual that has relative date filtering it doesn't work.

 

Here is the formula that I got to work. Since I had a page filter using the relative date filter set to "Today" This formula works to bring in the sales in the next 14 days from the page filter date. This also works to bring in sales previous to the date filter as well.

 

SO Cases in next 14 days =
CALCULATE(
FactSalesOrderLines[Cases Ordered],
DATESINPERIOD(DimDate[Date],
LASTDATE(DimDate[Date]),
+14, DAY
))

 

Thanks

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