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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Djam75
Regular Visitor

Visuel segment : how to define start andend date

 

Hello,

I have simplified the data and the BI report to better explain my issue.

I have a Power BI report that includes a "segment" visual with a date range filter (between startDate and endDate) for colonne OrderDate . The table displays the data based on this date filter.

The data is updated daily with new entries for the current day.

 

However, when I deploy this report to the Power BI server and view it, the dates (startDate and endDate) remain as those selected in Power BI Desktop during the report's design.

 

My issue is the following:  when i displauy report on BI serevr  (after new data has been added to the "orders" table), the report still shows the dates selected in Power BI Desktop at the time of deployment.

 

What I would like is that, by default, when the report is viewed on the server:

  • startDate should be the first day of the current year (01/01/2024),- (for my exemple i dont have a data)
  • endDate should be the day before the current date (currnt day, is a day when i display a report).

Then, if I change the dates, the filter should continue to apply to the "OrderDate" column.

 

Visuel_data.PNG

 

Thank you in advance for your help.

 

Djam75

PS-I am attaching a simplified version of the Power BI report, saved with endDate set to 10/09/2024.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from parry2k.

 

Hi @Djam75 ,

 

Based on the description of your problem, I achieved what you need by creating a new table as a field for the slicer and changing a setting, here are the exact steps I took:

1.Create a new table:

NewTable = CALENDAR(DATE(YEAR(TODAY()), 1, 1),TODAY() - 1)

vlinhuizhmsft_0-1727146009796.png

 

2.Create the relationship:

vlinhuizhmsft_1-1727146137948.png

 

3.Create the visuals:

vlinhuizhmsft_2-1727146186991.png

4.Then go to File>Options and settings>Options. Under Current File, select Report settings. Click on the box "Don’t allow end users to save filters on this file in the Power BI service".

vlinhuizhmsft_3-1727146396337.png

This ensures that every time a report is opened, it will display the default filters set by the report creator.

 

Best Regards,
Zhu
Community Support Team

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for the reply from parry2k.

 

Hi @Djam75 ,

 

Based on the description of your problem, I achieved what you need by creating a new table as a field for the slicer and changing a setting, here are the exact steps I took:

1.Create a new table:

NewTable = CALENDAR(DATE(YEAR(TODAY()), 1, 1),TODAY() - 1)

vlinhuizhmsft_0-1727146009796.png

 

2.Create the relationship:

vlinhuizhmsft_1-1727146137948.png

 

3.Create the visuals:

vlinhuizhmsft_2-1727146186991.png

4.Then go to File>Options and settings>Options. Under Current File, select Report settings. Click on the box "Don’t allow end users to save filters on this file in the Power BI service".

vlinhuizhmsft_3-1727146396337.png

This ensures that every time a report is opened, it will display the default filters set by the report creator.

 

Best Regards,
Zhu
Community Support Team

 

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

parry2k
Super User
Super User

@Djam75 have you looked at relative date filtering? Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn



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.

Thank you, Parry2k, for your suggestion. Sorry, it (relative date) doesn't work for us , as we want to keep the date filter between (startDate, endDate).

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.