Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
@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.
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