function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc dev 2264sfdc dev 2264 

Salesforce report help needed

Hi,

I am trying to create a report in salesforce which i need help on it

I have 2 objects account and contact

i have a date field in account called last date

my condition is if the lastdate is set to a value 3 months back contact records should be displayed in my report

for eg if last date is 1/05/2017

then the report should fetch the contact records 1/02/2017 alone

How do i achieve it in report salesforce

Kindly help me

Thanks in Advance
Best Answer chosen by sfdc dev 2264
Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
User-added image

Do you see that last line? It should work. For you, if it's not working can you screen shot your report filter?

All Answers

Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
Hi, there are two ways to do date filters. The first is by setting ranges on a report filter. Doing this only lets you set ranges based on certain dates or dates relative to today ( last 3 months from today). If you want to show a filter relative to another date field (created date contact within 3 months of created date account ) you need to use a formula on the contact that checks for the two dates and return something you can work with ( subtract the two dates to get a number of dates and filter report for days <= 60) 

for your example, could you tell more about what the final outcome should look like?
sfdc dev 2264sfdc dev 2264
I create a report giving a filter condition like account last date equals "1/05/2017"

then all contacts which was created on 1/02/2017 should be displayed

thats my requirement

how to i achieve that
Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
So, why don't you just search for 1/02/2017 on contact? You can have two filters on te report. 
sfdc dev 2264sfdc dev 2264
you mean by setting contact created date from 1/02/2017 to 31/02/2017 , if thats the case i would have to manually change it every month right , i just want to have a filter which would automatically fetch 3 months older records 
Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
Right, so you can use relative ranges (3 months ago) in the date filter. 
sfdc dev 2264sfdc dev 2264
i dont see that option 3 months ago in the date filter , do we have to customizae it in report
Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
Oh! Check this out:
https://help.salesforce.com/articleView?id=custom_dates.htm&type=0
sfdc dev 2264sfdc dev 2264
i just need to see contact records data from 1/02/2017 to 28/02/2017 alone
sfdc dev 2264sfdc dev 2264
i saw this , but that last n months is not coming in my report
sfdc dev 2264sfdc dev 2264
Patrick i gave the filter condition as

contact created date equals 3months ago

i typed manually 

 
Patrick Sullivan CloudAnswersPatrick Sullivan CloudAnswers
User-added image

Do you see that last line? It should work. For you, if it's not working can you screen shot your report filter?
This was selected as the best answer
sfdc dev 2264sfdc dev 2264
I got that Patrick , I created my report, thank you so much for the much needed help