<?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 Re: Measure iterating subset of data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743025#M2359</link>
    <description>&lt;P&gt;Darek,&lt;/P&gt;&lt;P&gt;I'd like to sum up settlement amount when Region or Category is specified as a filter for Dim_Cust_Vend.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 07:52:46 GMT</pubDate>
    <dc:creator>Mike_0828</dc:creator>
    <dc:date>2019-07-18T07:52:46Z</dc:date>
    <item>
      <title>Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/742314#M2330</link>
      <description>&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;I have a Fact table with accounts receivable (AR) and accounts payable (AP) amounts for each counterpaty.&lt;/P&gt;&lt;P&gt;The goal is to create measure with settlement amount equals MIN of AR and AP.&lt;/P&gt;&lt;P&gt;My current measure (Settlement_amt) works fine if I specify counterparty code as context, but if my context is Region or Category it works incorrectly.&lt;/P&gt;&lt;P&gt;I would like to create a measure which iterates over Dim_Cust_Vend and calculates Settlement_amt individually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solutions are very appreciated!!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 14:51:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/742314#M2330</guid>
      <dc:creator>Mike_0828</dc:creator>
      <dc:date>2019-07-17T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/742613#M2346</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="151464" data-lia-user-login="Mike_0828" class="lia-mention lia-mention-user"&gt;Mike_0828&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;I have a Fact table with accounts receivable (AR) and accounts payable (AP) amounts for each counterpaty.&lt;/P&gt;&lt;P&gt;The goal is to create measure with settlement amount equals MIN of AR and AP.&lt;/P&gt;&lt;P&gt;My current measure (Settlement_amt) works fine if I specify counterparty code as context, but if my context is Region or Category it works incorrectly.&lt;/P&gt;&lt;P&gt;I would like to create a measure which iterates over Dim_Cust_Vend and calculates Settlement_amt individually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solutions are very appreciated!!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Mate, you say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I would like to create a measure which iterates over Dim_Cust_Vend and calculates Settlement_amt individually.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, if it calculates Settlement_amt individually, then it must do something with the amounts because a measure can only return a number or text. So then, what do you want to do with the amounts? Take an average? Sum them up? Take the min or max? What's the aggregator for the amounts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:00:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/742613#M2346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-17T21:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743025#M2359</link>
      <description>&lt;P&gt;Darek,&lt;/P&gt;&lt;P&gt;I'd like to sum up settlement amount when Region or Category is specified as a filter for Dim_Cust_Vend.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 07:52:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743025#M2359</guid>
      <dc:creator>Mike_0828</dc:creator>
      <dc:date>2019-07-18T07:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743094#M2361</link>
      <description>&lt;PRE&gt;-- Replace your old Settlement_amt with the following:

[Settlement Amount] =
var __settlementAmount =
	SUMX(
		VALUES( Dim_Cust_Vend[Code] );
		MIN( [AR]; [AP] )
	)
return
	__settlementAmount

-- This will work in any scenario and is an extension of the old measure.&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;D.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 08:34:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743094#M2361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-18T08:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743334#M2374</link>
      <description>&lt;P&gt;This brief formula really works!&lt;/P&gt;&lt;P&gt;Could you explain the meaning of VALUES()?&lt;/P&gt;&lt;P&gt;I tried to remove VALUES from formula and system showed me an error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A single value for column 'Code' in table 'Dim_Cust_Vend' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 11:41:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743334#M2374</guid>
      <dc:creator>Mike_0828</dc:creator>
      <dc:date>2019-07-18T11:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Measure iterating subset of data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743349#M2375</link>
      <description>&lt;P&gt;&lt;A href="https://dax.guide/values/" target="_blank"&gt;https://dax.guide/values/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/values-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/values-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 12:02:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-iterating-subset-of-data/m-p/743349#M2375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-18T12:02:03Z</dc:date>
    </item>
  </channel>
</rss>

