Forum Discussion
PurpleNinja
2 years agoRegular Visitor
Override Month Selection when Week is Selected
I have two filters in my Power BI file. One is the month and one is the week starting. Some times just the month is selected but sometimes a user may select a month then select a week starting.
Is there a way sot that when a user selects a specific week starting date (e.g., January 28th, 2024), the dashboard shows data for the entire week starting from that date (Jan 28 - Feb 3) regardless of whether some days of that week fall into the previous or next month even if a month is selected. The goal is to ensure that when a week starting date is selected, it overrides the month filter and displays the entire week's data, not just the days within the selected month.
Month and Week Selected (only showing days within the month)
Week Only Selected (shows all days in the week)
1 Reply
- amitchandakSuper User
PurpleNinja , Try like
New measure =
Var _fil = calculate(isfiltered(Date[Week]) , allselected())
return
if(_fil, calculate([Your measure], Date[Week] in Values(Date[Week]) ), [Your Measure])
or
New measure =
Var _fil = calculate(isfiltered(Date[Week]) , allselected())
return
if(_fil, calculate([Your measure], filter(all(Date), Date[Week] in Values(Date[Week]) )), [Your Measure])