Power Query Rolling 12 Months Formula

charllie

Well-known Member
Joined
Apr 6, 2005
Messages
986
Hi All

Apologies if this has been raised previously but i have not found anything that does exactly what i want.

I am just discovering power queries and the wonderful things it can do for me.

I am currently creating a new power query and in the "Transform" stage. I have a column titled "Date Raised" and appears like "17/03/2021". I have now created a new custom column titled "Rolling Years". I want to inserts a formula in the "Custom Column Formula" section that does the following:

If "Date Raised" is greater than 12 months the text in the column titled "Rolling Years" = "Over 12 Months"
but
If "Date Raised" is lower than 12 months the text in the column titled "Rolling Years" = "Under 12 Months"

I have tried a few formula's but cannot get it to work.

I would appreciate any help in resolving this.

Thanks

Charllie
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try the following in Add custom column.
It's on a year basis though.

=Duration.Days((Date.From(DateTime.LocalNow())-[Date Raised]))/365

Cheers
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top