cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ToddMate Frequent Visitor
Frequent Visitor

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.

1 ACCEPTED SOLUTION

Accepted Solutions
d_gosbell Established Member
Established Member

Re: Dividing One Measure against Another Measure.

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)

 

 2019-03 filter.png

 

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 6
d_gosbell Established Member
Established Member

Re: Dividing One Measure against Another Measure.

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 Frequent Visitor
Frequent Visitor

Re: Dividing One Measure against Another Measure.

Measure1

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

Re: Dividing One Measure against Another Measure.


@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?

ToddMate Frequent Visitor
Frequent Visitor

Re: Dividing One Measure against Another Measure.

Hi d_gosbell,

 

Yes i used visual filters assuming this was the correct way to do it. Is there a better way to achieve this? (Guess this explains why it didnt work Smiley Happy )

 

Really appreciate your assistance here.

 

PBI.JPG

 

 

d_gosbell Established Member
Established Member

Re: Dividing One Measure against Another Measure.

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)

 

 2019-03 filter.png

 

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

ToddMate Frequent Visitor
Frequent Visitor

Re: Dividing One Measure against Another Measure.

Fantastic and really appreciate your replies.