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