title: DAX Userelationship function
body: <p>I have this issue with Userelationship function in DAX. 
  I have two Tables <strong>SalesFact</strong> and <strong>DimPromoSkus</strong> like this:</p>
  
  <p>Diagram View.</p>
  
  <p><img src="https://i.stack.imgur.com/TfWmJ.png" alt="Diagram View"></p>
  
  <p>The 2 tables in Data View are like this:</p>
  
  <p>Data View</p>
  
  <p><img src="https://i.stack.imgur.com/rpbGK.png" alt="Data View"></p>
  
  <p>The 2 tables are linked from <strong>SkuCampaign1</strong>, <strong>SkuCampaign2</strong>, <strong>SkuCampaign3</strong> in the <strong>SalesFact</strong> to the <strong>SkuCampaign</strong> from the DimPromoSkus. </p>
  
  <p>So basically the goal of DimPromoSkus table is to indicate if the product was in campaign C1, C2 or C3. 
  For example the campaign C1 happened between days 1/1/2019 to 4/1/2019 but only SKUS A1 and A2 were selled on Promotion. A2 and A3 were off promo but sold during campaign C1 period.</p>
  
  <p>My goal is to calculate Promoted Sales on each Campaign C1,C2 and C3. Of course this could be done with a lookupcolumn and then calculate the Sales where that key was found BUT I would like to use <strong>USERELATIONSHIP</strong> function.</p>
  
  <p>So, to calculate PromoSales for campaign C1 my measure in Theory should be:</p>
  
  <pre><code>PromoSalesC1:=CALCULATE(SUM(SalesFact[Sales]);USERELATIONSHIP(SalesFact[SkuCampaign1];DimPromoSkus[SkuCampaign]))
  </code></pre>
  
  <p>The result obtained should be 25 but is returning me 155 which is the total sum of the rows so is not doing really nothing
  The result keeps giving 155 if I use SkuCampaign2 or SkuCampaign3 which are inactive relations but <strong>USERELATIONSHIP</strong> should activate this..</p>
  
  <p>Any idea of what is going on or am I missing something? :)
  Thanks</p>