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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AppVine
New Member

PBI Slicer set EndDate Todays Date and StartDate is 1 year

Hi Everyone, 

Good day! 

I have a slicer with start date and end date. My problem is that, my start date will not automatically set to todays date. 

AppVine_0-1671519870284.png

What I want is to set as default is EndDate should todays date and StartDate is 1 year of current date

2 REPLIES 2
MahyarTF
Memorable Member
Memorable Member

Hi,

In my opinion, you need to create another date dimension that is started from today and ends based on another field in another table or whatever you want) and then link the particular new date table to your Date dimension.

You could use the below code to create a new date table that is started from the current date :

 
CurrDate = DATESBETWEEN('Date'[Date], TODAY(), max('Date'[Date]))
 
*** Date[Date] is the Date dimension 
Thanks for your Kudos and please mark it as a solution if it helps you.
Mahyartf

got error: 

I used code: 

 

CurrDate = DATESBETWEEN('QI_Data_RPN'[IncidentDate], TODAY(), max('QI_Data_RPN'[IncidentDate]))

If I use code below. It returns empty date

CurrDate = DATESBETWEEN('Date'[Date], TODAY(), max('QI_Data_RPN'[IncidentDate]))

 

AppVine_0-1671534746878.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.