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
igibson
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
v-xjiin-msft
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
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.