0

I want to use a Date field in a summary formula in a report.

Scenario: Account Opening Date should be between the current fiscal year (starting in June).

Opening Date(Opening_Date__c) - Data Type - Date

I tried the following formula but encountered an error. Can anyone help me resolve this issue?

IF(
    AND(
         Account.Opening_Date__c:UNIQUE >= DATE(YEAR(TODAY()), 6, 1), 
         Account.Opening_Date__c:UNIQUE<= DATE(YEAR(TODAY())+1, 5, 31)
       ),
     1, 0
)

Error: Incorrect parameter type for operator '>='. Expected Text, received Date

2
  • 1
    I don't think you can do this. You might have to do the logic in a formula field first and then add it to the report. Commented Jun 12 at 18:46
  • @DanWooding, as per your instructions I created a formula field with a return type of checkbox in Account. However, I encountered an error: 'Incorrect parameter type for operator '='. Expected Number, received Boolean'. Summary Formula : IF(Account.Shop_Opened_FY__c:UNIQUE = TRUE,1, 0). Can you assist with this?
    – Lilly
    Commented Jun 13 at 11:42

1 Answer 1

0

You don't need to make a summary formula field on a report once you have a formula field created on the object. Because your formula is a checkbox you can simply summarize it on the column and get your count. Or you can group by it or whatever you need.

enter image description here

1
  • I want to use the checkbox field only in the summary formula because I need to reference another field in the condition Formula(Shop_Opened_FY__c): AND( NOT(ISBLANK(Shop_Opened__c)), IF( AND( Shop_Opened__c >= DATE(2024, 1, 1), Shop_Opened__c <= DATE(2024, 12, 31) ), true, false ) ) Summary Formula: IF(AND( TEXT(Account.Status__c:UNIQUE) = "Active" ,Account.Shop_Opened_FY__c:UNIQUE), Account.No_of_Open_Shop__c:SUM, 0) . Can you assist to resolve the error?
    – Lilly
    Commented Jun 17 at 6:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .