Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

SWITCH ( TRUE() ) with multiple criteria?

I'm trying to perform a calculation that will render costs charged by multiple vendors across multiple products and then get a grand total. Maybe I'm trying to do too much up front, but here's where ...
  • Greg_Deckler's avatar
    6 years ago

    @aharon0414 - I usually do not see calculate statements in a SWITCH(TRUE()...) statement. SWITCH is usually like:

    SWITCH(TRUE(),
      'Vendor'[VENDORNAME] = "jim" && 'Vendor'[Vendor Billable] > 300000, <some calc>,
      'Vendor'[VENDORNAME] = "jim" && 'Vendor'[Vendor Billable] > 150000, <some calc>,
      <some calc>
    )