SSRS: Calculate the Max Value <p>I use SQL Server Report Builder.</p> <p>I have got 20 machines and I calculate the scrap data for these 20 machines. In my query it looks like:</p> <pre><code>SELECT SUM(case when ScrapName = 'Blown wheel' then scrapUnits else 0 end) AS BlownWheel, Sum(case when ScrapName = 'Blown bell' then scrapUnits else 0 end) AS BlownBell, Sum(case when ScrapName = 'Produced' then scrapUnits else 0 end) AS Produced </code></pre> <p>And to get the scrap I did a calculation in SSRS:</p> <pre><code>=SUM(Fields!BlownWheel.Value) + SUM(Fields!BlownBell.Value) / SUM(Fields!Produced.Value)*100 </code></pre> <p>This calculation gave me the correct value.</p> <p>My <strong>Problem</strong> now is that I must create a new report and in this report I would like to show <strong>one</strong> of these 20 machines which produced the maximum value of scrap. </p> <p>I have done this manually in Excel before. And now I would like to create it as a Report.</p>