title: How to get max Value in PowerBI for a measure for each category
body: <p>i am making a powerbi report which should give me the category having maximum value of defect (not total)</p>
  <p>This is my dataset
  <a href="https://i.stack.imgur.com/yYU4N.png" rel="nofollow noreferrer">PowerBI Dataset</a></p>
  <p>I am trying to use the following DAX formula</p>
  <pre><code>NO 1 Defect = LOOKUPVALUE('Camera Data'[Attribute],'Camera Data'[Value],MAX('Camera Data'[Value]))
  </code></pre>
  <p>And i am using a card to display the category of max value. This works fine till the time i have a single max value. the moment it becomes more than 1 then it is giving error</p>
  <pre><code>Multiple values supplied where only 1 value was expected
  </code></pre>
  <p>All i want is only the first of that max value category should be displayed on the card. How can i do it?</p>
  <p>PS: to extract data from the image you can use this site <a href="https://extracttable.com/" rel="nofollow noreferrer">https://extracttable.com/</a> this would work for free and 1 image will be easily converted to dataset.</p>