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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
MintuBaruah
Helper III
Helper III

Column with -1 dates

Hello All,

 

I wanted to create a column in the Power query to show previous dates from the existing column. Please refer to the expected results table:

Date Previous Day-Date
23/01/2023 22/01/2023
22/01/2023 21/01/2023
01/12/2022 30/11/2022

 

In the above example: The Date is the column I have and the Previous Day-Date is the column that I want to show.

 

Please help resolve this problem.

Thank you.

1 ACCEPTED SOLUTION

Hi @MintuBaruah ,
Please try this out 
Date.AddDays([Order Date],-1)
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
pratyashasamal
Super User
Super User

Hi @MintuBaruah .
You can simply use PREVIOUSDAY() function.

For example :-Measure 2 = PREVIOUSDAY(Orders[Order Date])

pratyashasamal_0-1674456702111.png

Please follow this link :-https://powerbidocs.com/2020/09/13/dax-previousday-function/#:~:text=Step%2D1%3A%20Create%20a%20meas....
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

 





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

Proud to be a Super User!





Hi @pratyashasamal 

 

Thank you for your reply.

I have to create the Previous Day-Date column in Power query so that I can create a unique ID column.

Please provide solution for the same for Power query.

Hi @MintuBaruah ,
Please try this out 
Date.AddDays([Order Date],-1)
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





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

Proud to be a Super User!





Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors