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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Ibadkhan
Helper III
Helper III

Custom Filter

Hello all, hope you all doing good.

 

I have created 2 measures to show the opening and the closing of the month by selecting the month in slicer. Those measures are,

 

Measure 1 = IF(MAX('Final Data Sheet'[invm_Date])<=EOMONTH(MAX(Dates[Date]),0),1)
Measure 2 = IF(MAX('Final Data Sheet'[invm_Date])<=EOMONTH(MAX(Dates[Date]),-1),1)
 
This solution was provided by community memeber, link is here, 
 
Now i want show the purchases of the the month with opening and closing selected in filter.
 
Is there any solution?
 
Thans In Advance
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ibadkhan , Based on what I got try like

 

measure =
var _min = minx(allselected('Date'), 'Date'[Date])
var _max = maxx(allselected('Date'), 'Date'[Date])
return
CALCULATE(sum('Final Data Sheet'[Purchase]), FILTER(('Final Data Sheet'),'Final Data Sheet'[invm_Date] >= _min && 'Final Data Sheet'[invm_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

3 REPLIES 3
amitchandak
Super User
Super User

@Ibadkhan , Based on what I got try like

 

measure =
var _min = minx(allselected('Date'), 'Date'[Date])
var _max = maxx(allselected('Date'), 'Date'[Date])
return
CALCULATE(sum('Final Data Sheet'[Purchase]), FILTER(('Final Data Sheet'),'Final Data Sheet'[invm_Date] >= _min && 'Final Data Sheet'[invm_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

@amitchandak  one more thing, can i use measure instead of column for purchase?

Thanks alot @amitchandak . It is working perfectly...

 

You really made my day... 🙂 🙂

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.