Created date - Today's Date

KimC2504

Board Regular
Joined
Jul 17, 2012
Messages
141
Hi There,
I am using PowerBI and I have been asked to show all opportunities that have been created in the last 50 days. How would you approach this? I was thinking of a custom column with a formula?

Note, dates below are in DD/MM/YYYY format.

Oppty #Oppty NameCreated DateAmount
OPE-123Example 11/1/20201000
OPE-234Example 25/12/2019500
OPE-125Example 31/4/2020750
OPE-111Example 410/4/2020999
OPE-222Example 520/2/2020800
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
maybe: [Created Date] >= Date.AddDays(DateTime.LocalNow(),-50) then filter by TRUE
 
Upvote 0
Hi @sandy666,

Thanks for your suggestion, unfortunately that doesn't work as you cannot apply operator > to Date Time and Date :(

I was also trying to create a custom column with Created Date after 1/2/2020 but I had no luck with that either.

[Created Date]<DATE(2020,2,1)
 
Upvote 0
try Date.From([Created Date]) >= Date.AddDays(Date.From(DateTime.LocalNow()),-50)
of course it should be in custom column
 
Upvote 0
Hi @sandy666, thank you so much, that worked perfectly.

I am also trying to create a custom column that was created after 1/2/2020 instead of -50 days.

I have tried
Code:
Date.From([Created Date]) >= Date.AddDays(Date.From(2020,2,1)))
but get error message(3 arguments were passed to a function which expects between 1 & 2)

Am I close? I am struggling with these dates formula's and I am trying to find some good tutorials to learn them.
 
Upvote 0
@sandy666 My manager has asked me a different question! They are always changing their minds!
I tried out your new suggestion and it is amazing. Thanks again(y)(y)(y)(y)
 
Upvote 0

Forum statistics

Threads
1,223,794
Messages
6,174,643
Members
452,575
Latest member
Fstick546

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