Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
sherlingiftyM
Frequent Visitor

Slicers

1. I have created New Parameter for "Year,Half Year,Quarter & Month" as  Named as "Year Toggle" & visual it as slicer;
2. Secondly ,i need to add another slicer as Named as  "Month" ,
while chosing Year - Need to shows Month along with Years [eg Apr'20]
           Half Year - Need to shows maximum year of maximum months -[Half year] 
            Quarter -Need to shows maximum year of maximum Quarter Year months -[Quarter] 
            Month -   Need to shows maximum year of maximum months -[Month] 
While chosing New parameter Slicer, second Slicer need to function dynamically!

sherlingiftyM_2-1729845067340.png

 

1 ACCEPTED SOLUTION
Uzi2019
Super User
Super User

Hi @sherlingiftyM 

 

I am not able to understand by your description what second filter will represent just a number of days or something else.

 

would you please try this method I hope this would help you to create your custome date range filter.

 

https://www.youtube.com/watch?v=JLupF1j49wo

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

2 REPLIES 2
saud968
Memorable Member
Memorable Member

Try this

Create the “Month” Slicer:
Add a new slicer for the “Month” field.
Create a Supporting Table:
Create a table that includes all the combinations of Year, Half Year, Quarter, and Month. This table will help in dynamically filtering the data based on the selection in the “Year Toggle” slicer.
Create Measures for Dynamic Filtering:
Create measures to dynamically filter the “Month” slicer based on the selection in the “Year Toggle” slicer. Here are some example measures:
SelectedYearToggle = SELECTEDVALUE('Year Toggle'[Year Toggle])

MaxMonth =
CALCULATE(
MAX('Date'[Month]),
FILTER(
'Date',
'Date'[Year] = MAX('Date'[Year])
)
)

MaxHalfYear =
CALCULATE(
MAX('Date'[Month]),
FILTER(
'Date',
'Date'[Half Year] = MAX('Date'[Half Year])
)
)

MaxQuarter =
CALCULATE(
MAX('Date'[Month]),
FILTER(
'Date',
'Date'[Quarter] = MAX('Date'[Quarter])
)
)

MaxMonthOverall = MAX('Date'[Month])

Use the Measures in the “Month” Slicer:
Use the measures created above to dynamically filter the “Month” slicer. You can use a SWITCH statement to apply the correct measure based on the selection in the “Year Toggle” slicer.
DynamicMonthFilter =
SWITCH(
TRUE(),
[SelectedYearToggle] = "Year", [MaxMonth],
[SelectedYearToggle] = "Half Year", [MaxHalfYear],
[SelectedYearToggle] = "Quarter", [MaxQuarter],
[SelectedYearToggle] = "Month", [MaxMonthOverall]
)

Apply the Dynamic Filter:
Apply the DynamicMonthFilter measure to the “Month” slicer to ensure it updates based on the selection in the “Year Toggle” slicer.

Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

Uzi2019
Super User
Super User

Hi @sherlingiftyM 

 

I am not able to understand by your description what second filter will represent just a number of days or something else.

 

would you please try this method I hope this would help you to create your custome date range filter.

 

https://www.youtube.com/watch?v=JLupF1j49wo

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.