title: Calculation in Tableau gives wrong result
body: <p>I have a calculation to make</p>
  
  <p>For each club and Operator I want to create Revenues with the following formula</p>
  
  <pre><code>Revenue = successfulbillinghits * pricePerBilling * Rate * Multiple Factor
  </code></pre>
  
  <p><strong>Components are:</strong></p>
  
  <ul>
  <li><p>Successfulbillinghits = Number of billings for a customer</p></li>
  <li><p>PricePerBilling = Price of per billing (Keep changing)</p></li>
  <li><p>Currency Exchange Rate = Currency Rate from local currency to dollar (Keep changing)</p></li>
  <li><p>Multiple Factor = Constant for each club and operator</p></li>
  </ul>
  
  <p><strong>I have tried:</strong> </p>
  
  <pre><code>Revenue = SUM([successfulbillinghits])*ATTR([pricePerBilling])*AVG([Rate])*ATTR([Multiple Factor])
  </code></pre>
  
  <p><strong>Result:</strong>
  Successfulbillinghits is fine (Gives sensible result)
  Multiple factor is fine (Gives sensible result)</p>
  
  <p><strong>Problem</strong> is with the following where it gives <code>*</code>
  PricePerBilling
  Currency Exchange Rate</p>
  
  <p><strong>What I want:</strong>
  I want each PricePerBilling and exchange rate of the row! e.g. if there are 10 rows and there are 3 different price billings and 10 different exchange rates, i want tableau to check the 10 individual rows and get the corresponding exchange rate and the billing rate.</p>
  
  <p>Using tableau desktop</p>
  
  <p>Here is the sample (Column names are shortened)</p>
  
  <pre><code>Op  Cl  billinghits Price/Billing Ex-Rate   MultipleFactor  Revenue 
  1   2   5           2             0.27      1               2.7
  1   2   6           2.5           0.27      1               4.05
  1   2   3           2.5           0.28      1               2.1
  1   2   4           2             0.27      1               2.16
                                                       Total: 11.01
  </code></pre>
  
  <p>Result should look like:                   </p>
  
  <pre><code>  Operatpr  Club    Revenue             
      1        2       11.01      
  </code></pre>