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
SaurabhMahajan
New Member

Is it possible to have date slicer having last 12 days as selected by default

I have a date slicer which should show last 12 days as selected when report opens. Further, user should have flexibility to select any other date range.

8 REPLIES 8
parry2k
Super User
Super User

did you looked at relative date filtering? here is the link which can provide more details about it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Relative Date filtering gives option to get data of last/next few days. But, simultaneously we want option to get data between any two dates, which is not possible in relative date filtering.

Hi @SaurabhMahajan,

 

Have you solved your problem?

 

If you have solved your problem, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please feel free to ask.

 

 

As another option, you could create a between slicer for your user to select data range and drag date filed to visual level filter or page level filter. Then you could set the date filter to be last 12 days, it will show the data last 12 days when you open the report.

 

Untitled.png

 

In addition, you could vote this similar idea in Power BI ideas Forum.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

With above approach, we are adding relative page level filter as 12 days. But, user won't be able to see any data prior to this data range.

We are expecting a between date slicer in which last 12 days are shown selected by default. But, user should have flexibility to select any historical date range.

Hi @SaurabhMahajan,

 

For your requiement, if you want to show the data of the last 12 days by default and you also want your user could slicer the data out of the last 12 days, it may impossible for us to to that directly in Power BI because there will be conflicts between filters.

 

For a workaround, I suggest you could use Bookmark features.

 

You could create Page 1 with a relative slicer (last 12 days )and Page 2 with a date between slicer witch your users could filter the date range.

 

Then you could set the Page 2 with Bookmark and create a bookmark button in Page 1.

 

When you open the report it will show the Page 1 with the data last 12 days by default, if you want to slicer other dates, you could click bookmark button to Page 2 and select the date slicer.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-piga-msftThat is good solution but I'm not able to understand why we cannot use Slicer in this case, that is easy to manage/scalable solution



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@SaurabhMahajandid you tried the slicer option which I mentioned earlier or you think that is not the option.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

may be the option is to add a slicer with two options:

 

Last 12 days

User selected date range

 

and in your calculation use date selection based on slicer, if it is last 12 days then calulate the date range and apply in the fomula, also use this as a default selection, so that when user opens the report, it is always 12 month otherwise if use selected 2nd option in selected then use date range.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.