Forum Discussion

jmcph's avatar
jmcph
Icon for Helper III rankHelper III
5 years ago
Solved

what if to affect selected values only

Hi i am creating a table visual that uses "What if" analysis as follows:      What i want is for the Increase / Decrease on the Forecast Qty Value to affect only the selected Category and le...
  • amitchandak's avatar
    5 years ago

    jmcph , Make sure Category is an independent slicer

    measure =
    Var SalesQty = Sum ( Sales[Qty])
    Return
    calculate([SalesQty] * (1 * [Forecast Qty Value] ), filter(Table, Table[CATEGORY] = selectedvalue(CATEGORY[CATEGORY])))
    +calculate([SalesQty], filter(Table, Table[CATEGORY] <> selectedvalue(CATEGORY[CATEGORY])))