Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
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
Solved! Go to Solution.
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:
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.
Parameter = {
("Weekly", NAMEOF('Table'[weekly]), 0),
("Monthly", NAMEOF('Table'[Date].[Month]), 1)
}
4.Then, modify the settings of the visual object:
5.Following that, create two slicers, adjusting the settings for one of them:
6.Here are the final results, which I hope will meet your needs:
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.
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:
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.
Parameter = {
("Weekly", NAMEOF('Table'[weekly]), 0),
("Monthly", NAMEOF('Table'[Date].[Month]), 1)
}
4.Then, modify the settings of the visual object:
5.Following that, create two slicers, adjusting the settings for one of them:
6.Here are the final results, which I hope will meet your needs:
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.
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
49 | |
46 |