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
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))

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))

@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
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.