Forum Discussion
NEED HELP - Create a Measure/DAX for Date Filter
Hi Experts,
My Dataset refreshes incrementally everyday. For Current Month, I have Day wise data and for past months - end of months data.
i.e, At the begining of Next month, current months data will be as of end of month's only.
i need to apply filter -- Past Months should be slected. For Current Month, only latest day should be selected. Without manual intervention, this should continue. Please advise if this can be done.
Thanks.
4 Replies
- amitchandak
Super User
bboobe , refer if these can help
https://www.youtube.com/watch?v=lkHFpmA4SJ4
https://www.youtube.com/watch?v=JrwFLfUFaxk- bboobe
Helper I
amitchandak it did not. I already have a measure to see if the date is the latest date of current month.. but the issue is, i need to include past months as well in the filter.
present drawback - When the current month ends, the next month's dates will become "latest date" according to my formula and the last month wont be included in the filter- amitchandak
Super User
bboobe , Relative date slicer, Before option in Date slicer are the one that can be used at the page level and you can have a slicer to control thing further
Like The column and its sort column. This can be used as slicer
Month Name =
var _mm= datediff([date],eomonth(today(),0),month)
return
switch( true(),
_mm =0, "Current Month",
_mm =1, "Last Month",
format([Date],"MMM-YYYY")
)Month year Sort = format([Date],"YYYYMM")
- Greg_Deckler
Community Champion
Probably. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.