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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vinothsusai
Helper III
Helper III

Is it possible to Date Filter ( Min to Max - 1). Please advise.

Hi,

I have a date filter in the visual that can select min date and max date. If i select the min and max date, that visual should filter min date to Max date - 1. Please advise.

 

Vinothsusai_0-1603720984399.png

 

Thanks

Vinoth

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Vinothsusai , Try like

Period =
var _max =maxx(allselected(date),date[date]) -1
var _min =minx(allselected(date,date[date]))

return
CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date]=_max || date[date]=_min))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Vinothsusai , Try like

Period =
var _max =maxx(allselected(date),date[date]) -1
var _min =minx(allselected(date,date[date]))

return
CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date]=_max || date[date]=_min))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.