<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to select a sub-set of rows to do a min() in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-select-a-sub-set-of-rows-to-do-a-min/m-p/66932#M72</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I have somewhat of a challenge I can't quite figure out.&lt;BR /&gt;I have an SQL table full of production data information and some OK counters.&lt;BR /&gt;The OK counters are not normalized, meaning they carry on the counter from the previous order.&lt;BR /&gt;I would like to add a column to my dataset, where I normalize this data.&lt;BR /&gt;How I imagined I would do it, was simply to subtract the MIN value, for that production line.&lt;BR /&gt;Unfortunately I can't figure out how to select a subset of the rows, based on the production line's Id.&lt;BR /&gt;If I just do a min(), I will select across multiple production-lines, meaning the min will only be valid for one of them.&lt;BR /&gt;&lt;BR /&gt;So my table is basically:&lt;BR /&gt;&lt;BR /&gt;ProductionLineId, OrderNo, Timestamp, OkCounter&lt;BR /&gt;&lt;BR /&gt;Where I'd like to add a NormalizedOk.&lt;BR /&gt;&lt;BR /&gt;How should I go ahead with achieving this?&lt;BR /&gt;&lt;BR /&gt;I hope it is clear what I'm trying to achieve. Please ask any questions that come up.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 08:00:04 GMT</pubDate>
    <dc:creator>Nicolai</dc:creator>
    <dc:date>2016-09-09T08:00:04Z</dc:date>
    <item>
      <title>How to select a sub-set of rows to do a min()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-select-a-sub-set-of-rows-to-do-a-min/m-p/66932#M72</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have somewhat of a challenge I can't quite figure out.&lt;BR /&gt;I have an SQL table full of production data information and some OK counters.&lt;BR /&gt;The OK counters are not normalized, meaning they carry on the counter from the previous order.&lt;BR /&gt;I would like to add a column to my dataset, where I normalize this data.&lt;BR /&gt;How I imagined I would do it, was simply to subtract the MIN value, for that production line.&lt;BR /&gt;Unfortunately I can't figure out how to select a subset of the rows, based on the production line's Id.&lt;BR /&gt;If I just do a min(), I will select across multiple production-lines, meaning the min will only be valid for one of them.&lt;BR /&gt;&lt;BR /&gt;So my table is basically:&lt;BR /&gt;&lt;BR /&gt;ProductionLineId, OrderNo, Timestamp, OkCounter&lt;BR /&gt;&lt;BR /&gt;Where I'd like to add a NormalizedOk.&lt;BR /&gt;&lt;BR /&gt;How should I go ahead with achieving this?&lt;BR /&gt;&lt;BR /&gt;I hope it is clear what I'm trying to achieve. Please ask any questions that come up.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 08:00:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-select-a-sub-set-of-rows-to-do-a-min/m-p/66932#M72</guid>
      <dc:creator>Nicolai</dc:creator>
      <dc:date>2016-09-09T08:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to select a sub-set of rows to do a min()</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-select-a-sub-set-of-rows-to-do-a-min/m-p/69372#M73</link>
      <description>&lt;P&gt;This is how I would try to solve the problem,&lt;/P&gt;&lt;PRE&gt;Min/Production ID = Summarize(&amp;lt;YourTableName&amp;gt;, ProductionID, min (OK number))&lt;/PRE&gt;&lt;P&gt;This will generate a table that conatins the minimum for each production id. Then you can join this table with the original and create a new calculated column where you subtract i.e&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normalized number = ok number - min number&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 04:37:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-select-a-sub-set-of-rows-to-do-a-min/m-p/69372#M73</guid>
      <dc:creator>quratzafar</dc:creator>
      <dc:date>2016-09-19T04:37:26Z</dc:date>
    </item>
  </channel>
</rss>

