cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mloc1990 Frequent Visitor
Frequent Visitor

Subtract a column in table2 numofmonths from a date field in table1

Hi,

 

I have Table1 with [authdate] I'm trying to subtract table2[NumofMonths] from this date to get a new date. From the solutions I've found the subtraction of the months is always a static number. How would I subtract the column  NumofMonths to get the new authdate?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Subtract a column in table2 numofmonths from a date field in table1

@mloc1990 ,

 

You can modify calculate column as below:

Result =
DATEDIFF ( Table[NumofMonths], Table[CurrentNum], MONTH )

Community Support Team _ Jimmy Tao

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

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Subtract a column in table2 numofmonths from a date field in table1

@mloc1990 ,

 

You can create a calculate column using DAX below:

 

authdate = Table[CurrentNum] - Table[NumofMonths]

 

Community Support Team _ Jimmy Tao

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

mloc1990 Frequent Visitor
Frequent Visitor

Re: Subtract a column in table2 numofmonths from a date field in table1

@v-yuta-msft 

 

I've tried this but it only takes a number of days from the original date instead of months.

Community Support Team
Community Support Team

Re: Subtract a column in table2 numofmonths from a date field in table1

@mloc1990 ,

 

You can modify calculate column as below:

Result =
DATEDIFF ( Table[NumofMonths], Table[CurrentNum], MONTH )

Community Support Team _ Jimmy Tao

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

View solution in original post

Highlighted
mloc1990 Frequent Visitor
Frequent Visitor

Re: Subtract a column in table2 numofmonths from a date field in table1

Thanks @v-yuta-msft  this works!

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,842)