cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mdrammeh Member
Member

How to Add or Subtract Dates from a count of dates value?

Hello,

 

I am looking for assistance on how to solve the following functon in both Power BI and Power Query.

 

Thank you!Months Back Measure.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-ljerr-msft Super Contributor
Super Contributor

Re: How to Add or Subtract Dates from a count of dates value?

Hi @mdrammeh,

 

Based on my test, your formula should work in Query Editor, Custom Column under Add Column tab.

 

addmonth.PNG

 

Regards

3 REPLIES 3
Super User
Super User

Re: How to Add or Subtract Dates from a count of dates value?

You are trying to use Power Query "M" functions in DAX. You can't do that.

 

You want to use functions from here:

https://msdn.microsoft.com/en-us/library/ee634396.aspx

 

Specifically, probably the DATEADD function or something like it:

https://msdn.microsoft.com/en-us/library/ee634905.aspx

 

Refer to my blog article here on the Languages of Power BI

https://community.powerbi.com/t5/Community-Blog/The-Languages-of-Power-BI/ba-p/69104


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

v-ljerr-msft Super Contributor
Super Contributor

Re: How to Add or Subtract Dates from a count of dates value?

Hi @mdrammeh,

 

Based on my test, your formula should work in Query Editor, Custom Column under Add Column tab.

 

addmonth.PNG

 

Regards

mdrammeh Member
Member

Re: How to Add or Subtract Dates from a count of dates value?

Thanks for answering my question!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 198 members 2,177 guests
Please welcome our newest community members: