Forum Discussion

ajcde's avatar
ajcde
New Member
9 years ago
Solved

Measures dependent on Slicers

Is it possible for me to use multiple slicers on a page but only have my measure calculated based on a specific slicer. I want to calculate multiple measures, but each one will be based on a separate slicer on the same page.

  • ajcde

     

    You can create a measure with multiple other measures. But, you can't use slicer for each involved measure to make different filter context together in this "complex" measure, unless you fix the context in formula for each measure.

     

    For example, you create measures like below:

     

    Measure A =SUM(Table[Column1])

     

    Measure B =SUM(Table[Column2])

     

    Measure C =SUM(Table[Column3])

     

    Measure Complex = [Measure A] + [Measure B] + [Measure C]

     

    Then you may have Silcer A for Measure A, Slicer B for Measure B, and Slicer C for Measure C, and you have edit the interactions to avoid them affecting each other. When you make selection in Slicer A, B and C, those selections will not be taken to Measure Complex, unless you specify filter context for each of them in formula like:

     

    Measure Complex =
    CALCULATE ( [Measure A], FILTER ( Table, Table[Column] = "XXX" ) )
        + CALCULATE ( [Measure B], FILTER ( Table, Table[Column] = "XXX" ) )
        + CALCULATE ( [Measure C], FILTER ( Table, Table[Column] = "XXX" ) )

     

    Regards,

     

     

3 Replies

  • Yes you can. If you click on the slicer, then you can edit what it interacts with.

     

    After you press that you will be able to see the following:

     

    So here you can choose if the slicer that you have selected should interact with a graph or whatever you have added.

     

    Kind regards

    Peter

    • ajcde's avatar
      ajcde
      New Member

      Right and I have done that for the visualization portion but I want to use the measure again to create a more complex measure that uses multiple measures I previously created. Each measure will be dependent on a different slicer and once I put it into a new calculation it is again being filtered by multiple slicers which I am hoping to avoid.

      • v-sihou-msft's avatar
        v-sihou-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        ajcde

         

        You can create a measure with multiple other measures. But, you can't use slicer for each involved measure to make different filter context together in this "complex" measure, unless you fix the context in formula for each measure.

         

        For example, you create measures like below:

         

        Measure A =SUM(Table[Column1])

         

        Measure B =SUM(Table[Column2])

         

        Measure C =SUM(Table[Column3])

         

        Measure Complex = [Measure A] + [Measure B] + [Measure C]

         

        Then you may have Silcer A for Measure A, Slicer B for Measure B, and Slicer C for Measure C, and you have edit the interactions to avoid them affecting each other. When you make selection in Slicer A, B and C, those selections will not be taken to Measure Complex, unless you specify filter context for each of them in formula like:

         

        Measure Complex =
        CALCULATE ( [Measure A], FILTER ( Table, Table[Column] = "XXX" ) )
            + CALCULATE ( [Measure B], FILTER ( Table, Table[Column] = "XXX" ) )
            + CALCULATE ( [Measure C], FILTER ( Table, Table[Column] = "XXX" ) )

         

        Regards,