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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
DoubleEx
New Member

Filter last "n" days from user interface

Hi,

I simply want to give the user option to pick how many days back is data is displayed on their report. For example, show production for the last 5 days. I know how to do this in the dataset query but I want this to be variable based on operator choice. Any way to do this?

 

Thanks

 

4 REPLIES 4

@DoubleEx You can do this by using a slicer on the report page. They can select any date/day you set up for them. Here is an explanation if you aren't familiar with the concept.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thanks @Seth_C_Bauer I understand the slicer and tried to come up with a nice way to configure it to only display the last 7 days out of 3 years of dates. For example, I can create a query that "Filters Rows" on the date column using "in the previous 7 days" and it will create a nice sub-set of data for the last seven days. I could use that query in my report but I'd rather the logic be in the slicer and not create another query that needs to be maintained.

 

I was hoping to have a Power BI tab that is using the same 3 year dataset/query but filter for the last 7 days. Avoiding the need to have 2 queries and the need to update the dataset to get the correct data.  

 

Thanks 

 

 

 

 

Hi @DoubleEx,

 

Currently, it's not supported to custom a query within a slicer. It can only load entire dataset into slicer for filtering data. But you can use some custom visuals (like "TimeLine", "Advanced Time Slicer") to apply a date range in your slicer. It will be better usage for your scenario.

 

Regards,

@DoubleEx Have you checked out the custom visual "Timeline" - https://app.powerbi.com/visuals/ this slicer just takes an input of Date and allows you to select any number of variations on day/month/qtr/year without having to define additional calculated columns or multiple slicers


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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