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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.