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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.