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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
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.