Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Iam working on powerbi report that includes a "reporting period" and "period" slicers. reporting period is relative date function
whereas period has date hierachies in slicer which includes options for quarter,month,weekend date. The data gets filtered based on the slicer selection. I have a requirement where , when I select "last 1 week" option in the slicer, it should automatically filter data for
last week . the interaction works expected for most visuals .
however. for some visuals , when a week is selected , I want to filter the data for the corresponding month end date rather than just the selected week.
I'm attaching slicer for reference. Can you help me with solution for this ?
probably create a measure and use it as visual level filter ?
Solved! Go to Solution.
@anonymous2967 Create a measure to determine the month-end date for the selected week:
DAX
SelectedWeekEndDate =
VAR SelectedWeek = MAX('Date'[WeekEndDate])
VAR MonthEndDate = EOMONTH(SelectedWeek, 0)
RETURN MonthEndDate
Create a measure to filter data based on the month-end date:
FilteredByMonthEndDate =
CALCULATE(
SUM('YourTable'[YourMeasure]),
FILTER(
'Date',
'Date'[Date] = [SelectedWeekEndDate]
)
)
Go to the visual where you want to apply this filter.
Drag the FilteredByMonthEndDate measure to the visual-level filters pane.
Set the filter condition to show data where FilteredByMonthEndDate is not blank.
Proud to be a Super User! |
|
Hi @anonymous2967,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @bhanu_gautam., for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it
Dax Measure For MonthEnd Filter:
MonthEnd_Filter =
VAR MaxSelectedDate =
MAX('Sales'[Date]) -- Gets the latest date selected from the slicer
VAR EndOfMonthDate =
EOMONTH(MaxSelectedDate, 0) -- Gets end of the month for that selected date
RETURN
IF (
MAX('Sales'[Date]) = EndOfMonthDate,
1,
0
)
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @anonymous2967,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @bhanu_gautam., for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it
Dax Measure For MonthEnd Filter:
MonthEnd_Filter =
VAR MaxSelectedDate =
MAX('Sales'[Date]) -- Gets the latest date selected from the slicer
VAR EndOfMonthDate =
EOMONTH(MaxSelectedDate, 0) -- Gets end of the month for that selected date
RETURN
IF (
MAX('Sales'[Date]) = EndOfMonthDate,
1,
0
)
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @anonymous2967,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @anonymous2967,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @anonymous2967,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
@anonymous2967 Create a measure to determine the month-end date for the selected week:
DAX
SelectedWeekEndDate =
VAR SelectedWeek = MAX('Date'[WeekEndDate])
VAR MonthEndDate = EOMONTH(SelectedWeek, 0)
RETURN MonthEndDate
Create a measure to filter data based on the month-end date:
FilteredByMonthEndDate =
CALCULATE(
SUM('YourTable'[YourMeasure]),
FILTER(
'Date',
'Date'[Date] = [SelectedWeekEndDate]
)
)
Go to the visual where you want to apply this filter.
Drag the FilteredByMonthEndDate measure to the visual-level filters pane.
Set the filter condition to show data where FilteredByMonthEndDate is not blank.
Proud to be a Super User! |
|
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |