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
Vijay sai Mahajan 5Vijay sai Mahajan 5 

Reports with different timeframes

I want to create a report that shows data within that time frame. For example I want accounts created count within last 7 days and 1 day within same report(without changing or using filter). Is this possible with salesforce reports ?
Best Answer chosen by Vijay sai Mahajan 5
ShivankurShivankur (Salesforce Developers) 
Hi Vijay,

Here is an approach to meet this requirement:
  • Create a formula field like Day Diff as Number which will calculate number of days from Createddate.
FLOOR( (NOW()- CreatedDate))
  • Go to Report and define Bucket field as follows with Source column as Day Diff field as created above.
Range                   Name
= 1                      Created in last 1 day
<= 7                     Created in last 7 days
  • Now change the report type as Summary Report and place that bucket field for grouping and finally run the report. It should show you accounts which were created within last 7 days and 1 day within the same report.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.
 

All Answers

ShivankurShivankur (Salesforce Developers) 
Hi Vijay,

Here is an approach to meet this requirement:
  • Create a formula field like Day Diff as Number which will calculate number of days from Createddate.
FLOOR( (NOW()- CreatedDate))
  • Go to Report and define Bucket field as follows with Source column as Day Diff field as created above.
Range                   Name
= 1                      Created in last 1 day
<= 7                     Created in last 7 days
  • Now change the report type as Summary Report and place that bucket field for grouping and finally run the report. It should show you accounts which were created within last 7 days and 1 day within the same report.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.
 
This was selected as the best answer
Vijay sai Mahajan 5Vijay sai Mahajan 5
We can't have buckets on the Formula fields. Is there any other way we can do this.
ShivankurShivankur (Salesforce Developers) 
Hi Vijay,

You can follow an additional step to store the values from this formula field to be stored in other custom fields which is supported for buckets. And then use that field value for further steps.

Hope this gives you an extended view of the suggestion posted above. Please mark as Best Answer so that it can help others in future.

Thanks.
Edward GlencrossEdward Glencross
To do this, select your preference for the Timeframe period by choosing from either the pre-defined timeframes which are Yesterday, 7 days, Last Week, 30 days, or 90 days, or, use the Custom option to customize your date. If you have big issue then they took 90 days plus time

https://www.mygiftcardsite.win/
Vijay sai Mahajan 5Vijay sai Mahajan 5
Hi,
In my report, I have Average response time for last 24 hours and last 7 days. Is there any way to trigger subscription for report only if Avg(last 24 hours) > Avg(Last 7 days) ?