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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sgallo
Advocate V
Advocate V

Changing Slicer values between Weeks and Months

Hi all,

 

I currently have my reports split in two, where I show by week and by month views. 

I tried to merge them into one using bookmarks and drilling through visuals. This resulted in having a "weekly" and "monthly" button selection that would change the view of the graphs accordingly. Below the example:

 

sgallo_0-1730306004921.png

sgallo_2-1730306073941.png

 

 

This worked for all the visuals apart from the Slicer on the top left of the screenshots that would not drill down/up nor allow a measure change.

Is there a way to have a slicer change between the week and month measures depending on bookmarks (or buttons or any other view)?

 

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @sgallo 

Your solution using bookmarks is excellent; however, based on my understanding of your requirements, I would recommend using parameter fields instead.

1.Firstly, here is my original data:

vlinyulumsft_0-1730343692562.png

2.Secondly, create a new column based on the original date column that spans weeks. Below is an example of my calculated column, which you can adjust according to your needs:

weekly1 = WEEKNUM('Table'[Date])
weekly = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[weekly1]=EARLIER('Table'[weekly1])))

 

3.Next, take the month hierarchy from the original date column and combine it with the newly created calculated column as parameter fields, renaming them accordingly.

vlinyulumsft_1-1730343741562.png

vlinyulumsft_2-1730343741563.png

Parameter = {
    ("Weekly", NAMEOF('Table'[weekly]), 0),
    ("Monthly", NAMEOF('Table'[Date].[Month]), 1)
}

4.Then, modify the settings of the visual object:

vlinyulumsft_3-1730343778729.png

5.Following that, create two slicers, adjusting the settings for one of them:

 

vlinyulumsft_4-1730343778731.png

vlinyulumsft_5-1730343785526.png

6.Here are the final results, which I hope will meet your needs:

vlinyulumsft_6-1730343816010.png

vlinyulumsft_7-1730343816012.png

7.Here is the relevant documentation:

 Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @sgallo 

Your solution using bookmarks is excellent; however, based on my understanding of your requirements, I would recommend using parameter fields instead.

1.Firstly, here is my original data:

vlinyulumsft_0-1730343692562.png

2.Secondly, create a new column based on the original date column that spans weeks. Below is an example of my calculated column, which you can adjust according to your needs:

weekly1 = WEEKNUM('Table'[Date])
weekly = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[weekly1]=EARLIER('Table'[weekly1])))

 

3.Next, take the month hierarchy from the original date column and combine it with the newly created calculated column as parameter fields, renaming them accordingly.

vlinyulumsft_1-1730343741562.png

vlinyulumsft_2-1730343741563.png

Parameter = {
    ("Weekly", NAMEOF('Table'[weekly]), 0),
    ("Monthly", NAMEOF('Table'[Date].[Month]), 1)
}

4.Then, modify the settings of the visual object:

vlinyulumsft_3-1730343778729.png

5.Following that, create two slicers, adjusting the settings for one of them:

 

vlinyulumsft_4-1730343778731.png

vlinyulumsft_5-1730343785526.png

6.Here are the final results, which I hope will meet your needs:

vlinyulumsft_6-1730343816010.png

vlinyulumsft_7-1730343816012.png

7.Here is the relevant documentation:

 Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.