Search code examples
crystal-reportscrystal-reports-2008

Crystal Sum with two conditions


I am trying to get summary by two conditions, much like Sumifs function of excel Like - Sum(Total_Costs) where Region = 4 and Currency = USD. Thanks in advance


Solution

  • You will have to create a Formula called @Region4USD

    Something like

    if ({YourReport.Region} = 4 and {YourReport.Curency} = "USD") then
        {YourReport.Total_Cost}
    else
        0
    

    Then create a SUM on the formula