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

2 Slicers : Select one type of date slicer on one page to be the same slicer in the other page ?

@AllisonKennedy 
@amitchandak 
I have sales data from Jan 1st 2021 till 14th Sep 2021 for 3 products (X,Y,Z) for 6 stores (A,B,C,D,E,F). 

There are 2 pages. The 1st page is the "store menu" page which depicts cards of these 6 stores.  The cards depict the avearge sales of these 3 products.

Akshay_Kinge_0-1631615511384.png

The 2nd page is the "Product Sales" page which shows sales of all 3 products for a store in a bar graph. Example for store A shown below.

Akshay_Kinge_1-1631615675995.png

Buttons are placed on the cards in "store menu" page so as to navigate to "product sales" page to depict product sales for that store. Example : Clicking on "Store C" in Store menu page will navigate to "Product Sales" page showing sales of the 3 products under Store C. 

The client wishes to have 2 date slicers : "Relative" and "Between" that he can switch around. Meaning only one date slicer can be displayed at a time.

I have placed 2 buttons in the "Store Menu" page called "Relative Slicer" and "Between Slicer" .
Bookmarks are placed in such a way that if "Relative Slicer" button is selected then the Between Date slicer remains hidden .
 

Akshay_Kinge_2-1631616317888.png

Converesly, if the "Between Slicer" button is clicked then the relative date slicer remains hidden .

The same 2 buttons are placed in the "Product Sales" Page with same steps applied there as well .


By default , when the user clicks on either button ,I put  the date slicer to appear in its default "Clear selections" state.


Problem Statement: Whatever date selection is made by the user on a slicer should be on the "Store menu" page should display the same slicer with same selection in the "Product Sales" Page and vice versa.
Example : If user selects Last 3 weeks  on the Relative slicer , he should see Last 3 weeks selection on the Relative slicer in the "Product Sales " page.
If user selects May 3rd 2021 to August 8th  on the Between Date slicer in the "Store menu" page then May 3rd to Aug 8th date selection should appear on the between date slicer in "Product Sales" page.

I have synced the relative slicers from both pages by grouping them under "Sync Visuals" to ensure they retain the same date selection made by user on both pages. Same is done for between slicers.
However, whatever type of slicer is selected in one page is not reflected on the other .

For Example : If we select Store on "Product Sales" Page with Between Date selection as May 3rd 2021 to Aug 8th 2021 . Then By clicking on the back button (left arrow button)...
 

Akshay_Kinge_3-1631617812176.png

... I navigate to the "Store Menu" page with relative slicer being displayed as this was the slicer last used on this "Store Menu" page.

Akshay_Kinge_4-1631618010031.png

I have played around with the bookmark options (Data, Display, Current Page) but it lead to nowhere.

How do I go about this ?
Any help will be greatly appreciated.

1 ACCEPTED SOLUTION

@Anonymous  Do you want/need the user to be able to change the store once they've gone to details page? You may find drillthrough useful if not. See the 'B' pages in the attached. 

 

As for your date slicer, the sync slicers will sync the state of the date slicer as well (whether it's relative or between as well as which dates are chosen so not sure  @MFelix if your multiple pages idea will work...) @Anonymous  though you could use this to your advantage, if you don't mind that the bookmarks reset the date slicer each time (which changing slicer type will do anyway) then you can just do one slicer and turn on ONLY data and only for the single selected Date slicer. Then sync this slicer across to your details page. See my 'A' pages in attached file for this.

 

Finally, it's ugly (but you could play with other custom visuals, including charticulator or chiclet slicer) but you could concatenate the store name and key avg value you want in the cards so that the menu could work with slicer??? 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

I have sales data of 3 Products X, Y, and Z from 3 stores: Quincy's, Lulu, and Best Buy. 

Akshay_Kinge_0-1631286994053.png

I have created a simple menu page that has 3 buttons.

Akshay_Kinge_1-1631287028026.png

Each button, upon clicking, will take him/her to a sales data page, where the sales of the 3 products are displayed on a bar graph.
The example image below depicts Quincy's.

Akshay_Kinge_2-1631287108112.png

 

This task was accomplished by using bookmarks for each store. For Quincy's, I only selected only the store name slicer visual while the slicer is set to "Quincy's" and updated the "Quincy's" bookmark.

Akshay_Kinge_4-1631287653133.png

 

Clicking on "Quincy's" button navigates to "Quincy's" bookmark that displays the Sales of all 3 Products under Quincy's Store.

The same steps are repeated for other stores.


I have been informed that the names of some stores are going to be changed. "Quincy's" will now be "Store Q". Now instead of using "Store" as a slicer, I have to now make use of "Store_ID" to identify the stores rather than using the Store names. 

My approach was to use Store_ID as a slicer in the Sales Data page, make the selection that corresponds to its Store, hide the STore_ID Slicer visual and then update the bookmark. (The Store ID slicer is hidden so as to appear user friendly since the client will recognize the store's name than the store IDs)


I have made this update for all 3 stores. I have also selected Store name slicer depending on the case as explained below:

Case 1: Only selecting the Store_ID slicer visual to update the bookmark.
If I only select the Store_ID slicer visual to update the bookmark...

Akshay_Kinge_5-1631287965661.png

... and return to the store menu page and click on say Lulu Store...

Akshay_Kinge_7-1631288243245.png

(Keep in mind the store ID slicer is present but hidden on the page as per the above-mentioned reason)

 

...I get this blank bar graph visual, this is because while the Lulu Store ID (1002) is set to its bookmark, the slicer is still showing the Store Q from the previous slicer selection.

Because of this the User has to manually select from the Store Name Slicer and Select "Lulu". 

Akshay_Kinge_8-1631288374883.png

 Case 2: If I select both the Store Name Slicer and the Store_ID slicer visual to update the bookmark. 
If I select both the Store Name Slicer and the Store_ID slicer visual to update the bookmark...

Akshay_Kinge_9-1631289013942.png

... and return to the main store menu and select store "Best Buy", I will get the desired output.

Akshay_Kinge_10-1631289250342.png

However, Let's say now Store Name "Best Buy" changes to "BB". Now if we return to the main store menu page, click on the now BB  button to see BB sales data, we get this...

Akshay_Kinge_11-1631292514325.png

Similar problem as in case 1 . Since "Best Buy " has changed to "BB", the ID (1003) is now associated with "BB". but once again the slicer has kept our previous slicer selection which was Best Buy. Once again the user has to manually select the right store name from the store name slicer.

Akshay_Kinge_12-1631292945470.png


Problem Statement: How to prevent or remove this issue of slicers keeping the previous selection that the user has made? If a change has been made to the value under the slicer, it simply shouldn't appear in the slicer RATHER the new should appear.

I don't want the clients to manually make the right selection on the store name slicer. The right store name should appear automatically. The previous selection shouldn't appear RATHER the updated value should appear.

@Anonymous Unfortunately the slicer remembers the previous selection and there's no way to change that behaviour - yes it's frustrating.

 

HOWEVER, I do have a potential solution for you - will require one extra click from the users initially, but overcomes your problem and is MUCH easier to maintain.

AllisonKennedy_0-1631456302358.png

 

On your navigation page, remove the three buttons and replace them with a slicer for store:

  • Click the format paint roller and
    • expand General section, change orientation to 'Horizontal'. This will make the stores look like buttons (you could also use the custom visual chiclet slicer). 
    • expand Selection controls and turn 'On' single select (this is optional)

Now add a single button that says "Go" or something similar.

 

Set the action for that Go button to Page navigation. 

 

Sync the slicers for Store on both pages. https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers#sync-and-use-slicers-on-other-pages 

AllisonKennedy_1-1631456322400.png

 

As a side note, I would unpivot the products so you have two columns: Product Name and Value, then you only need to put one column in the chart instead of one per product: https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Thank you for your response.
I looked into your attached pbix file.
Unfortunately , the way we designed and established the store menu, we cannot swap it to slicers.

The main focus is primarily on the previous slicer selection. 

@Anonymous Then your only option is to submit the idea to https://ideas.powerbi.com/ and wait for this change (if it's ever implemented)

 

Otherwise you may need to consider the redesign of your store menu - why can't it be swapped to slicers? 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Just realised you have opened a new thread on this topic: https://community.powerbi.com/t5/Desktop/2-Slicers-Select-one-type-of-date-slicer-on-one-page-to-be-... 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe that your issue is related with the option Data on the bookmarks. When you have this option selected the bookmark saves the data you have placed on your selection (slicers, filters, drilltrough so on) and always resets the bookmark to that visualization.

 

In this case since you have different slicers and options you need to turn off that option for both slicers that way you will get the values from the current selection that is on the home page.

 

Another thing that I believe can help you achieve this is instead of making the two slicers on the same page is to have two different pages one with the relative slicer and another with the between slicer, since you are using bookmarks and buttons on both of them you can change between pages without the user knowing.

Don't know if the navigation can also be done by the report pages or the user always need to go to the home page but if you hide this two pages then the navigation will be even better because the user cannot go to the pages directly without the home page.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@Anonymous  Do you want/need the user to be able to change the store once they've gone to details page? You may find drillthrough useful if not. See the 'B' pages in the attached. 

 

As for your date slicer, the sync slicers will sync the state of the date slicer as well (whether it's relative or between as well as which dates are chosen so not sure  @MFelix if your multiple pages idea will work...) @Anonymous  though you could use this to your advantage, if you don't mind that the bookmarks reset the date slicer each time (which changing slicer type will do anyway) then you can just do one slicer and turn on ONLY data and only for the single selected Date slicer. Then sync this slicer across to your details page. See my 'A' pages in attached file for this.

 

Finally, it's ugly (but you could play with other custom visuals, including charticulator or chiclet slicer) but you could concatenate the store name and key avg value you want in the cards so that the menu could work with slicer??? 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.