Forum Discussion

zanemj's avatar
zanemj
Regular Visitor
4 years ago

Comparing the same measure against itself with different filters

Hello all, I am having trouble figuring out how to compare the same measure against itself while being altered by different filters. 

 

For example, I am creating a dashboard to compare the emissions of a specific site location (on the left) against the average of many site locations (on the right). The averages on the right can be filtered by a slicer that can be filtering by Region, Business Unit, and Facility Type. So there are 3 filtering criteria that can be selected. The left is only examining one facility at a time, the Facility Names. In the example below, the site on the left has been selected and the right side is the average for all Manufacturing sites, but could theorectically be honed down to Manufacturing, Business Unit B, Region: America, etc. 

 

 

I want to add a measure that calculates the percent difference between the site selected and the average on the right side. So if we were looking at Electricity Usage, I want a little logo that shows the site on the left is 17% greater than that of the average for all manufacturing sites. This is the same measure however, just the one on either side is being altered by different slicers. The measure is FilteredElectricity[ElecUsageAvg] and I want to be able to compare it to itself based on what the slicers currently have selected. I attached a table with some data just to help visualize what I'm working with, any help here would be greatly appreciated!

 

 

Facility NamesRegionBusiness UnitFacility TypeElec Usage
DetroitAmericaUnit AFactory1,000,000
New YorkAmericaUnit BFactory2,000,000
GlasgowEuropeUnit AOffice30,000
FrankfurtEuropeUnit AOffice50,000

3 Replies

  • you cannot measure a measure.  You will have to create a separate measure that implements the comparison logic from scratch.

    • zanemj's avatar
      zanemj
      Regular Visitor

      How do I implement the comparison logic in side a new measure that accounts for the changing slicers?

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

        Measures operate within the filter context - which automatically includes the slicer choices. So you get that part "for free".