cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Show data only for comp stores

In my report I need to look at sales data for stores that were open more than a year prior. I have been showing this manually by having a bookmark button on each page labeled "show comp stores" which I must update each time a new store opens. When a store gets to 1 year open I want it to automattically start showing tyhe data. It needs to be able to be shown through a slicer to see all data or comp data. Is there a simple way to implement this based off of first data entry, or will I need to use the opening dates? 

3 REPLIES 3
Solution Sage
Solution Sage

@igibson

 

In your scenario, you want to display the data of each stores which is stored one year earlier than current day. Right?

 

First you should know that it is not possible to use slicer to effect stored bookmark in current Power BI. And you can submit an idea for this.

 

Then to achieve your requirement, I would suggest you to try parameters. You can refer to following steps:

 

1. Go to Query Edit - > Create a new Blank Query and use Power Query to specify it. Then you’ll get a list which contains two values: Current day and One year ago from current day. The query is like:

 

= {Date.AddYears(Date.From(DateTime.LocalNow()),-1),Date.From(DateTime.LocalNow())}

 

1.PNG

 

2. Then Go to Manage Parameters and New Parameter to create a new parameter. And the option settings are like below:

 

2.PNG

 

3. Go to your source table, select your date column - > Go to Date Filters - > Set your date column is before the parameter:

 

3.PNG

 

4. Close & Apply. Then you can edit parameter’s value to display your wanted data.

 

4.PNG5.PNG

Thanks,
Xi Jin.

I am trying to show data that is from a store that has been open for longer than one year. The goal is to be able to show only data from stores that have been open for one year using a slicer.

@igibson

 

First in my above sample, I have used parameter to filter the store data (since you didn't share us your sample data, I have to make a guess). And this parameter is defined as one year ago of current date (since you also didn't share us the definition of the contidion longer than one year, I have to make a guess too).

 

Thereby if my sample doesn't satisfy your requirement, please share us more information like your logic and some sample data.  

So that we can understand your requirement more clearly and make some proper tests. Otherwise, we can only make guesses.

 

Thanks,
Xi Jin.

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors