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
tomperro
Helper III
Helper III

Default Date Slicer Start to Beginning of Fical Year and End Date Default to Todays Date

Is there a way to have the start date of a date slicer to default to the start of the fiscal year and have the slicer end date default to todays date?

7 REPLIES 7
v-xuxinyi-msft
Community Support
Community Support

Hi @tomperro 

 

My sample:

vxuxinyimsft_1-1706493472965.png

 

You can create a measure for the date slicer.

Measure = 
VAR _startdate = MIN('Table'[Date])
RETURN
IF(MAX('Table'[Date]) >= _startdate && MAX('Table'[Date]) <= TODAY(), 1, 0)

 

Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_0-1706493445165.png

Is this the result you expect?

 

If I've misunderstood you, please provide detailed sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Please remove any sensitive data in advance.

 

Best Regards,
Community Support Team _Yuliax

 

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

I need the start date of te slicer to be the start of the fiscal year, which is 10/01/2023. and the end date of the slicer to be todays dates.

Slicer should be

10/01/2023   and 01/29/2024

Hi @tomperro 

 

Please check my sample data, what this formula does is to get all the dates within the start date and today's date range in the sample data, so that the dates that fulfill the condition are displayed as 1, and then put the MEASURE into the filter, so that the slicer's default date range only displays the dates that fulfill the condition.

 

Now I've modified my sample:

vxuxinyimsft_0-1706585662798.png

 

Measure = 
VAR _startdate = MIN('Date'[Date])
RETURN
IF(MAX('Date'[Date]) >= _startdate && MAX('Date'[Date]) <= TODAY(), 1, 0)

 

vxuxinyimsft_1-1706585746400.png

Best Regards,
Community Support Team _Yuliax

 

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

I need the start date of te slicer to be the start of the fiscal year, which is 10/01/2023. and the end date of the slicer to be todays dates.

Slicer should be

10/01/2023   and 01/29/2024

Ritaf1983
Super User
Super User

Hi @tomperro 

Please refer to the linked tutorials:

https://www.youtube.com/watch?v=QYEhj8o_toc

https://www.youtube.com/watch?v=7vDgDILsUsg

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

PijushRoy
Super User
Super User

Hi @tomperro 

Please find the video 
https://www.youtube.com/watch?v=MYHG-QSM8qw&t=143s

 

If your requirement is solved, please make sure to MARK AS SOLUTION and help other users find the solution quickly. Please hit the LIKE button if this comment helps you.

Thanks
Pijush

@PijushRoy  - That is a great option however, this is not exaclty what I am trying to do.
I would just like to have the start date default to the start of fiscal year and the end date to default to todays date.   
I already have an existing calendar table that I would like to use and not have to create a new calendar table.

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.