Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Starts with question

I have a measure Total Sales = sum(SALES[Sales])   If the customer name starts with "Acme" reduce SALES[Sales] by 12%, if the customer name starts with "Vect", reduce SALES[Sales] by 10%, if custom...
  • parry2k's avatar
    6 years ago

    Anonymous I would recommend to create a column with adjusted sales and then use this new column in the measures

     

    Adjusted Sales Column = 
    VAR __start = LEFT ( Table[Customer], 4 )
    RETURN
    SWITCH ( __start,
     "ACME", .88,
     "VECT", .90,
     "MERC", .81,
    1
    ) 
    *
    Table[Sales]