locked
calculate function with OR RRS feed

  • Question

  • How do you set up a calculate function as an OR? 

    Would it be like this? 

    Calculated Field 1:=CALCULATE([NumberofContracts],OR(COBI_COContract[RenewalType]="Auto Renewal",COBI_COContract[RenewalType]="Opt-In Renewal"))

    Saturday, December 10, 2016 1:39 AM

Answers

  • Sure, that is fine

    Self Service BI Expert using Power Pivot http://exceleratorbi.com.au

    Saturday, December 10, 2016 1:50 AM
    Answerer
  • Hello Alex, 

    You always have the option to use double pipe symbol to create an OR condition between two logical expressions.

    Calculated Field 1 :=
    CALCULATE (
        [NumberofContracts],
        COBI_COContract[RenewalType] = "Auto Renewal"
            || COBI_COContract[RenewalType] = "Opt-In Renewal"
    )

    Thanks, Nick  - 

    Sunday, December 11, 2016 3:13 PM

All replies

  • Sure, that is fine

    Self Service BI Expert using Power Pivot http://exceleratorbi.com.au

    Saturday, December 10, 2016 1:50 AM
    Answerer
  • Hello Alex, 

    You always have the option to use double pipe symbol to create an OR condition between two logical expressions.

    Calculated Field 1 :=
    CALCULATE (
        [NumberofContracts],
        COBI_COContract[RenewalType] = "Auto Renewal"
            || COBI_COContract[RenewalType] = "Opt-In Renewal"
    )

    Thanks, Nick  - 

    Sunday, December 11, 2016 3:13 PM