Forum Discussion

MHTANK's avatar
MHTANK
Icon for Helper III rankHelper III
2 years ago
Solved

slicing effect on report

DATA:

Report:

Measures:

sale_avg = CALCULATE(AVERAGE(Sheet1[sale_value]), Sheet1[Status]="Sale")
stock_avg = CALCULATE(AVERAGE(Sheet1[stock_Value]), Sheet1[Status]="Stock")
Purpose:
When I filter from slicer I want effect only on sale_avg line not affect stock_avg line data.
  • Hi MHTANK ,

     

    I apologize for the missleading answer, the question is that since you are using data from the same table you get the data filter on the visualization and there is no option for you to remove it since the context is based on the filtered values from the diff and you cannot change the context passed to the axis individually.

     

    For this create a new table with the months and make a relationship with the sheet1

     

     

    Now redo your measure to:

    stock_avg = 
    CALCULATE(AVERAGE(Sheet1[stock_Value]), FILTER(ALL(Sheet1[Status]),Sheet1[Status]="Stock"), REMOVEFILTERS(Sheet1[Diff], Sheet1[Month]))

    Please see attach file.

     

     

3 Replies

  • Hi MHTANK 

     

    Redo the stock average measure to:

    stock_avg = CALCULATE(AVERAGE(Sheet1[stock_Value]), Sheet1[Status]="Stock", REMOVEFILTERS(Sheet1[Diff]))

     

    • MHTANK's avatar
      MHTANK
      Icon for Helper III rankHelper III

      By that measure stock line also affect.

      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi MHTANK ,

         

        I apologize for the missleading answer, the question is that since you are using data from the same table you get the data filter on the visualization and there is no option for you to remove it since the context is based on the filtered values from the diff and you cannot change the context passed to the axis individually.

         

        For this create a new table with the months and make a relationship with the sheet1

         

         

        Now redo your measure to:

        stock_avg = 
        CALCULATE(AVERAGE(Sheet1[stock_Value]), FILTER(ALL(Sheet1[Status]),Sheet1[Status]="Stock"), REMOVEFILTERS(Sheet1[Diff], Sheet1[Month]))

        Please see attach file.