Forum Discussion
Filtering data table based on select month +1 months and consecutive years
- Anonymous1 year ago
Hi PBILearner2022 ,
Based on your description, I created these data.
1. create a date table to be used as a slicer.
DAX DateTable = ADDCOLUMNS ( CALENDAR(DATE(2024,1,1), DATE(2024,12,31)), // CALENDARAUTO(), "Year", YEAR([Date]), "Quarter", "Q" & FORMAT(CEILING(MONTH([Date])/3, 1), "#"), "Quarter No", CEILING(MONTH([Date])/3, 1), "Month No", MONTH([Date]), "Month Name", FORMAT([Date], "MMMM"), "Month Short Name", FORMAT([Date], "MMM"), "Month Short Name Plus Year", FORMAT([Date], "MMM,yy"), "DateSort", FORMAT([Date], "yyyyMMdd"), "Day Name", FORMAT([Date], "dddd"), "Details", FORMAT([Date], "dd-MMM-yyyy"), "Day Number", DAY ( [Date] ) )2. Create the measure.
Measure = IF(MAX('Table'[UtilizationDate]) >= EOMONTH(SELECTEDVALUE('DAX DateTable'[Date]),0) + 1, 1)3. Drag the measure into the filter pane of the table visual object to filter the data with the value of 1.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PBILearner2022 do you have a dimDate table yet?
Excel with Allison: DimDate: What, Why and How?
You can use time intelligence functions to shift the date filters. Then you'll just need to create a new measure using those functions. Looking at your post, my guess is the #FTE is your measure:
[FTE] = SUM( TableName[FTE] )
So then you'd create a measure:
[FTE future] = CALCULATE ( [FTE], DATESINPERIOD ( DimDate[Date] , 10, Year) )
You can change the parts in itallics, here's a list of Time Intelligence functions for inspriation: