Forum Discussion

jmcph's avatar
jmcph
Helper III
5 years ago
Solved

What if slicer problems

Hi. I am having a issues when slicing between 2 Categories in a "What if" scenario but it works fine if i only slice in 1 Category. My Category slicer is independent from any tables named 'Slicer Ca...
  • amitchandak's avatar
    5 years ago

    jmcph , Try like


    Sales Qty Forecast =
    Calculate(
    [SalesQty] * (1 + [Forecast Qty Value] ) ,
    Filter ( Productlist , Productlist[Category] in allselected ( 'Slicer Category Qty'[Category Qty] ))) +
    Calculate( [SalesQty] ,
    Filter ( Productlist , not(Productlist[Category] in allselected ( 'Slicer Category Qty'[Category Qty] ))))

    or
    Sales Qty Forecast =
    Calculate(
    [SalesQty] * (1 + [Forecast Qty Value] ) ,
    Filter ( Productlist , Productlist[Category] in values ( 'Slicer Category Qty'[Category Qty] ))) +
    Calculate( [SalesQty] ,
    Filter ( Productlist , not(Productlist[Category] in values ( 'Slicer Category Qty'[Category Qty] ))))