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
Anonymous
Not applicable

Calculation Reuired Date Filtering

Hi Experts ,

 

I am new to power bi and need help on the same on the calculation of relative filters between 2 or more date fields and show Sales Amount

Sum of Sales when 

1.Effective date within the date range selected(inclusive) and the Entry date is less than financial closing date for End of range selected

2. Effective date prior to the selection start date and entry date between financial opening date for Start of range selected and financial closing date for end of range selected(inclusive).

 

All dates are available in a single view .Hope someone helps me on the same .

 

Regards ,

Sunny 

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is very difficult to analyze without looking at the data and just by imagining. Based on your description, you could create measures to calculate data within the date range. You can refer to the DAX below:

Measure = 
CALCULATE ( 
	SUM ( table[SalesAmount] ),
	FILTER ( table, 
		table[Effective date] <= MAX ( table[Date] ) && 
		table[Effective date] >= MIN (table[Date]) &&
		table[Entry date]<= table[financial closing date]
	) 
)

if this is not the result you want, please provide some sample data or paste pictures, so that we can help you solve the problem.

 

Best Regards,

Liang 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

It is very difficult to analyze without looking at the data and just by imagining. Based on your description, you could create measures to calculate data within the date range. You can refer to the DAX below:

Measure = 
CALCULATE ( 
	SUM ( table[SalesAmount] ),
	FILTER ( table, 
		table[Effective date] <= MAX ( table[Date] ) && 
		table[Effective date] >= MIN (table[Date]) &&
		table[Entry date]<= table[financial closing date]
	) 
)

if this is not the result you want, please provide some sample data or paste pictures, so that we can help you solve the problem.

 

Best Regards,

Liang 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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