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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Filter visuals on a page based on two different date slicers

Hi, I have requirement as explained below, and please refer to attached picture.

 

There are two date slicers. User can select only one date in each slicer, like Start Date and End Date respectively. I am not using Range as user want specifically two boxes to select.

 

Now coming to the need, i want the table and bar graph to show only the two dates that user selected from both slicers. Right now on the picture/report they show all the dates.

Basic need is, based on the selected two dates by user, i need to show only those Month end day records in all the visuals on the page. Also we need to calculate Sales difference between those two days (I have already acheived this over measure)Report_Pic.png

 

Thanks

Manoj

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like


measure =
var _min = maxx(allselected(slicer_start),slicer_start[date])
var _min = maxx(allselected(slicer_end),slicer_end[date])
return
calculate([measure4], filter(Table(2),Table(2)[Date] = eomonth(Table(2)[Date],0) && Table(2)[Date] >= _min && Table(2)[Date] <=_max))

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like


measure =
var _min = maxx(allselected(slicer_start),slicer_start[date])
var _min = maxx(allselected(slicer_end),slicer_end[date])
return
calculate([measure4], filter(Table(2),Table(2)[Date] = eomonth(Table(2)[Date],0) && Table(2)[Date] >= _min && Table(2)[Date] <=_max))

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

Hi @amitchandak 

 

Had to slightly tweak the MIN and MAX of date variables. Below is the modified and working measure.

 

measure =
var mind=CALCULATE(MIN('Table (2)'[Date]), FILTER(ALL('Table (2)'),'Table (2)'[Date] in VALUES(slicer_Start[Date])))
var maxd=CALCULATE(MAX('Table (2)'[Date]), FILTER(ALL('Table (2)'),'Table (2)'[Date] in VALUES(Slicer_End[Date])))
return
calculate(sum('Table (2)'[sale]), filter('Table (2)','Table (2)'[Date] = eomonth('Table (2)'[Date],0) && 'Table (2)'[Date] >= mind && 'Table (2)'[Date] <=maxd))
 
Thanks
Manoj

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.