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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power BI: how to create a Button on the visual page to show the volumes of the update current week?

 Hi, experts. I have 3 visuals on a page which shows the volumes of produced products. we can call them 'v1', 'v2', 'v3'. and there is a location slicer. besides, I already created a 'date between' slicer that i can choose wharever date ranges i want. But still I want to create a button just below the slicer, and when i click the button, all the visuals on this page will show the volumes of the current week. and the most important is, everytime the data source refreshed, clicking the button will show to the new current week data. I think bookmark is not a good choice becasue it cannot update accordingly. Can anyone help me ?

Yao2319_0-1688368761130.png

 

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Perhaps you can set the current week as the default value in a slicer, then use a bookmark to store the state. Everytime when the dataset is refreshed, it will switch the current week. 

How to set current week as default slicer - Microsoft Fabric Community

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Anonymous
Not applicable

Hi Jing,

thank you for your reply. What I am currently doing is 

1. create a Calendar table extracted from my fact table :

Yao2319_0-1688723112295.png

2. then i created three tables which only contains dates of current week, previous week and YTD separately.

Yao2319_1-1688723202441.pngYao2319_2-1688723217512.png

Yao2319_3-1688723228855.png

3. then i append these three tables into one "period picklist table" 

Yao2319_4-1688723283171.png

4. then i created the relationships like this:

'Calendar'[Date] -(1 to many*)-> 'weekly visual'[Date]

and

'Calendar'[Date]' <-(1 to many*)-> 'Period Picklist'[Date]

Yao2319_5-1688723334214.png

5. finally I build a slicer for [Period] in 'period picklist'

Yao2319_6-1688723530729.png

Problem is, at the beginning it looks OK, the period slicer filters date slicer correctly.

However, once I changed the dateslicer manually, the period slicer can no longer filter the date slicer corrrectly. for example, i manually choose the date slicer from 1-10-2022 to 1-7-2023.

Yao2319_7-1688723889194.png

then I select YTD in the period slicer, though the data in the matrix visuals show correctly, but the date slicer does not change to the date range of YTD (from 2-1-2023 to 8-7-2023). I have to manually move the slider to make the date slicer show the correct date range. (i do make the right interactions to make the period slicer filter the date slicer.)

Yao2319_8-1688723931392.png

so I wonder how to make the period slicer filter the date slicer automartically, so i dont have to move the slider by myself everytime?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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