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
bilingual
Helper V
Helper V

Running 52 weeks - create filter for repport

Hi, i am working on a report which is updated weekly, and which needs to run the last 52 weeks, can anybody help? 🙂

 

Kind regards Daniel

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @bilingual ,

 

So you want to filter the data for the last 52 weeks, right?

If you have a date column in your data source, then you can use a relative date slicer to filter:

Use a relative date slicer or filter in Power BI - Power BI | Microsoft Docs

 

There is a difference between Weeks and Weeks (Calendar), it can be found in the above document, which has an explanation.

vstephenmsft_0-1642063697758.png

vstephenmsft_1-1642063705878.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

7 REPLIES 7
visheshjain
Solution Supplier
Solution Supplier

Hi @bilingual ,

 

You can hide the slicer from the visibility pane.

 

Thank you,

 

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



v-stephen-msft
Community Support
Community Support

Hi @bilingual ,

 

So you want to filter the data for the last 52 weeks, right?

If you have a date column in your data source, then you can use a relative date slicer to filter:

Use a relative date slicer or filter in Power BI - Power BI | Microsoft Docs

 

There is a difference between Weeks and Weeks (Calendar), it can be found in the above document, which has an explanation.

vstephenmsft_0-1642063697758.png

vstephenmsft_1-1642063705878.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Thanks a lot Stephen, it seem very intuitive. At  present I only export PowerBI as PDF,so i need the slicer to act as filter for all pages without being visible, aka as a normal filter.

What would be the optimal solution for doing so?

visheshjain
Solution Supplier
Solution Supplier

Hi @bilingual ,

Could you please provide more information as to do you want to update data of the last 52 weeks only or do you want calculations of the last 52 weeks and does your data contain only the last 52 weeks?

You can try the following link as to how to set up your calendar table for calculations over weeks:

Week-related calculations – DAX Patterns

 

Lastly, as @mhossain suggested that you can look into incremental refreshes but that won't work with the free license.

Hope this helps.

Thank you,

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hi , i periodically update the data every week by Excel files which has data from 2018, so when a new week is ready, i need a filter in the report which for example can be used to only show data greater than or equal to Week 1 2021 this week.

Hi @bilingual ,

 

I would suggest, that you create a YearWeek column in your calendar table, which will be numeric and then use that as a slicer on your report page.

You can create the slicer column based on the link I shared.

So the column will be 202101 for 2021 week 1, 202102 for 2022 week 2 etc. and the put this column as a slicer on the report page.

You can paste the same slicer on every page of your report, use sync slicers and hide it from the visibility pane from every page apart from the 1st page of your report. This way you have to make the selection only once.

 

Hope this helps.

 

Thank you,

 

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



mhossain
Solution Sage
Solution Sage

@bilingual 

If I read it correctly you require to keep only last 52 weeks of data in your model, what is your source, is it the relational database? Please check incremental refresh:

https://docs.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview

 

If you are unable to use incremental refresh, you can apply filter.

Please elaborate more if above doesn't solve.

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.