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

Date Formula to Adjust Date by any number of days, weeks or months

I am looking for a way to have a custom column look at one data set of dates and adjust it by one day. So if the date is 2/19/2018, I would like the output to be 1 less the day, so 2/18/2018. In excel you could just do this by subtracting 1 in the formula. How can you do this in Power BI?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @derektdb,

 

Just do it exactly as Excel, add a column with the following formula:

 

minus date = Dates_fact[Date] - 1

dates.png

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @derektdb,

 

Just do it exactly as Excel, add a column with the following formula:

 

minus date = Dates_fact[Date] - 1

dates.png

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I see my flaw! I was doing this in the Query Editor rather than from the Data tab. Thank you!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.