• Ken B
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 6
    Replies
I would like to create a report that lists all Leads and Opportunities inline, including Opportunities that were not created via Lead conversion. This is not possible with basic reporting filters.

Is this possible? I have been told that this could be achieved through Apex and Visualforce pages, but I haven't found any examples anywhere. Is it possible to report on both of these objects inline with the same fields in the same report?
  • October 15, 2014
  • Like
  • 0
Hello, 
I am trying to create a field that displays week of the year that the lead was created based off the CreatedDate (Date/Time) Field.

I think I need to first convert the CreatedDate (Date/Time) to a (Date) field and then use a formula to change the date into a Week Number.

The output of the formula should be a number (between 0-52).

This is what I'm working with right now... but this formula has errors:

DAY( DATEVALUE( date/time ))
IF(
2
  CEILING( ( date - DATE( YEAR( date ), 1, 1) + 1) / 7) > 52,
3
  52,
4
  CEILING( ( date - DATE( YEAR( date ), 1, 1) + 1) / 7)
5
)

Any help would be greatly appreciated! 
I would like to create a report that lists all Leads and Opportunities inline, including Opportunities that were not created via Lead conversion. This is not possible with basic reporting filters.

Is this possible? I have been told that this could be achieved through Apex and Visualforce pages, but I haven't found any examples anywhere. Is it possible to report on both of these objects inline with the same fields in the same report?
  • October 15, 2014
  • Like
  • 0

In Sweden and some other parts of Europe the week numbering is often using the ISO 8601 standard that says that the first week of the year is the first week with at least 4 days in the new year. Some consequences of this is that the final dates of one year can be week 52, 53 or even week 1( in the following year). The same goes for the first dates of a year.

 

To be able to do weekly comparison report Year-to-Year with this weeknumbering it is necessary to create custom fields for the opportunity that calculates the Year and Week number for a given close date. Here is one solution using three custom formula fields.

 

Field: Global Sales Report Weekday

Description:  Day 1 = Sunday, 2 = Monday....., 7=Saturday

Formula:  MOD( CloseDate  - DATE(1900, 1, 7), 7)+1

 

Field: Global Sales Report Week Year

Formula: YEAR(CloseDate + (MOD(8- Global_Sales_Report_Weekday__c ,7)-3))

 

Field: Global Sales Report Week

Formula:

FLOOR((CloseDate - DATE( Global_Sales_Report_Week_Year__c ,1,1) +
MOD(
(MOD( DATE(Global_Sales_Report_Week_Year__c,1,1) - DATE(1900, 1, 7), 7)+1)
+1,7)-3) / 7 + 1)

 

Hope this can be of use for anyone else

 

Peter Baeza

InfoAction AB, Sweden

 

  • March 15, 2010
  • Like
  • 3

I am a bit of a beginner at formulas, so hopefully one of you will think this is easy, and be able to help. :-)

 

Customer requirement:

 

Create a formula field that displays the Week Number (as Week 1, Week 2, etc), based on the Date entered on a particular record (same object).

 

Ex: 01/01/09 - 01/04/09 would return a value of "Week 1"  

01/05/09 - 01/11/09 = Week 2

01/12/09 - 01/18/09 = Week 3

 

and so on.....

 

Is using the CASE function the way to go, and if so, what's the shortest way to create this formula?

 

Thank you in advance!

S

 

  • April 20, 2009
  • Like
  • 0

In Sweden and some other parts of Europe the week numbering is often using the ISO 8601 standard that says that the first week of the year is the first week with at least 4 days in the new year. Some consequences of this is that the final dates of one year can be week 52, 53 or even week 1( in the following year). The same goes for the first dates of a year.

 

To be able to do weekly comparison report Year-to-Year with this weeknumbering it is necessary to create custom fields for the opportunity that calculates the Year and Week number for a given close date. Here is one solution using three custom formula fields.

 

Field: Global Sales Report Weekday

Description:  Day 1 = Sunday, 2 = Monday....., 7=Saturday

Formula:  MOD( CloseDate  - DATE(1900, 1, 7), 7)+1

 

Field: Global Sales Report Week Year

Formula: YEAR(CloseDate + (MOD(8- Global_Sales_Report_Weekday__c ,7)-3))

 

Field: Global Sales Report Week

Formula:

FLOOR((CloseDate - DATE( Global_Sales_Report_Week_Year__c ,1,1) +
MOD(
(MOD( DATE(Global_Sales_Report_Week_Year__c,1,1) - DATE(1900, 1, 7), 7)+1)
+1,7)-3) / 7 + 1)

 

Hope this can be of use for anyone else

 

Peter Baeza

InfoAction AB, Sweden

 

  • March 15, 2010
  • Like
  • 3