Forum Discussion

ToddMate's avatar
ToddMate
Helper II
7 years ago
Solved

Dividing One Measure against Another Measure.

Hi,

 

I have created two measures, one which calculates my total customers (M_Base) and the other which calculates my total losses for the month (M_Churn). Each of these measures have filters that return the result i am after.

 

When i try to create a new measure that divides M_Churn by M_Base, the filters that were within the measures i created are no longer used and the result that is returned is now a total of all of the values in the table/column. (should be a % value)

 

Sorry i am relatively new to Power BI so i apologise in advance if this is a simple thing to achieve but i can't find anything online that points me in the right direction.

  • Ah OK, so those filters are Visual level filters. They only apply to the current visual that you have highlighted.

     

    If you want these filters to apply to everything on the page you have a couple of options.

     

    1. If you want the user to be able to change these filters you can drag, Product and Month Ending on to your report page, but set them up using the filter visual, you can then either configure this to display a dropdown or a list and you can save the report with certain filters selected if you like. (and you should remove the existing filters first)

     

     

     

    2. But if you don't want the end users to change these filters you should create them in the "Page level filters" section in which case they will apply to every visual on the current page. Or if you have multiple pages and want the same filters across every page you can create the filters down in the "Report level filters" section

6 Replies

  • If you've definitely created these as Measures, not Calculated Columns this should just work. 

     

    Can you paste in the forumulas for these 3 measures so that we can see what you have done?

    • ToddMate's avatar
      ToddMate
      Helper II

      Measure1

      M_Disc = sum(SIOs[Disconnected]) 
       
      Measure2
      M_Base = sum(SIOs[EventValue])
       
      Measure3
      M_Result = DIVIDE([M_Disc], [M_Base])
      • d_gosbell's avatar
        d_gosbell
        Super User

        ToddMate wrote:

        Measure1

        M_Disc = sum(SIOs[Disconnected]) 
         
        Measure2
        M_Base = sum(SIOs[EventValue])
         
        Measure3
        M_Result = DIVIDE([M_Disc], [M_Base])

        Umm, there are no filters in any of those expressions. I was expecting to see something like CALCULATE( SUM( ...) , <filter expression> ) 

         

        Where have you applied your filters? If you are applying filters on a specific visual you would either need to apply the same filters to any new visuals you create or look at moving your filters into a filter control or up to the page or report level.

         

        Can you show us a screenshot of where you have setup these filters that you are talking about?