title: DAX - Creating a measure in power BI which ignores all filters except one
body: <p>I am trying to write a measure called Items Per Lift, which is calculated as follows:</p>
  
  <p>Count of Report Items / Count of Lifts</p>
  
  <p>I have a Line and Stacked Column chart, where this measure will be used. It currently shows the number of Report Items per engineer on the bars. I want to add a line which uses the above measure. I want to make sure that the denominator side of the measure (the right hand side) always uses the number of lifts per engineer in total, and never gets filtered further than that. The numerator (left side) of measure can be filtered depending on slicers selected on the page, etc</p>
  
  <p>The data is contained in two tables, 'Insurance Matrix' and 'ANSAPBILifts'. ANSAPBILifts contains 8016 rows in total. The data in each table is as follows:</p>
  
  <p>Insurance Matrix - contains all Report Items</p>
  
  <pre><code>Report Item          SiteIDLine
  1                    1212
  2                    1212
  3                    1256
  4                    1443
  </code></pre>
  
  <p>ANSAPBILifts - contains a list of all lifts with engineer assigned to each lift:</p>
  
  <pre><code>SiteIDLine           Engineer ID
  1212                 MRob
  1256                 MRob
  1443                 PCli
  1554                 PCli
  1599                 AKen
  </code></pre>
  
  <p>So the measure should always contain 2 on the denominator side for engineer MRob, it should always be 2 for engineer PCli, and it should always be 1 for engineer AKen, etc</p>
  
  <p>I wrote the following for the measure originally:</p>
  
  <pre><code>Items per Lift = divide(count('Insurance Matrix'[Report Item]),(COUNT(ANSAPBILifts[SiteIDLine])))
  </code></pre>
  
  <p>However, both the numerator and denominator would always get filtered with this measure. </p>
  
  <p>So I then used:</p>
  
  <pre><code>Items per LiftALL = divide(count('Insurance Matrix'[Report Item]),CALCULATE(COUNT(ANSAPBILifts[SiteIDLine]),ALLEXCEPT(ANSAPBILifts,ANSAPBILifts[Engineer ID])))
  </code></pre>
  
  <p>However, this results in the same measure as the first attempt, ie both sides of the measure are filtered if any slicers are used on the page.</p>
  
  <p>At this point I am a bit confused as to what to try next. If anyone can help it would be very appreciated</p>
  
  <p>See below chart with data, no filters applied on this chart, the measure is correct at this point:</p>
  
  <p><a href="https://i.stack.imgur.com/HIWWo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HIWWo.jpg" alt="enter image description here"></a></p>
  
  <p>See below chart with data, some filters have been applied on this page, the measure is now incorrect at this point, the denominator has now changed but I need it to remain the same:</p>
  
  <p><a href="https://i.stack.imgur.com/0ZR0G.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ZR0G.jpg" alt="enter image description here"></a></p>